I have a site that's in English, but there's a fair amount of French text on it. So, there are some special characters like è, é, á, etc.
I don't want to worry about those diacritics at all when searching (using solr 4), so that, say "any e gives you every e"
Right now, I have it so if you search for non-diacritics, you get all the related diacritics (search for "siecle", and get "siècle"), but if you search using diacritics it won't find anything (search for "siècle" returns nothing.)
I've been up and down between playing around with mapping-ISOLatin1Accent.txt and using:
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="false"/>
But nothing I've tried seems to have any change to this. I assume I have to add this to both AND in schema.xml, but I'm not sure which fieldtypes to do that in. There are fieldtypes of:
- "text field that only splits on whitespace for exact matching of words"
- "A text field that uses WordDelimiterFilter to enable splitting and matching of words..."
- "An unstemmed text field - good if one does not know the language of the field"
I've tried every combination I can think of, and cleared/rebuilt the index each time, but nothing. A search including diacritics always fails.
After looking through the admin site for Apache, it looks like the ASCIIFoldingFiltorFactory is being added to the index analyzer, but NOT the query analyzer for the fieldtypes of text, but I don't know why; I added it the same way to both analyzers.