1

For search keyword like "mäcman" in solr 6.5. I want to search ignoring accent character as "macman". When user search with "mäcman", it is giving resut. But when user search with "macman" it is not giving any result. I changed in config file, solr/core_name/conf/managed-schema like below configuration.

Try 1: I included mapping-FoldToASCII.txt file in path solr/core_name/conf/

<fieldType name="string_ci" class="solr.TextField" >
    <analyzer type="index">
    <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-FoldToASCII.txt"/>
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.ASCIIFoldingFilterFactory" />
    </analyzer>
    <analyzer type="query">
    <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-FoldToASCII.txt"/>
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.ASCIIFoldingFilterFactory" />
    </analyzer>
</fieldType>

Try 2:

<fieldType name="string_ci" class="solr.TextField">
    <analyzer type="index">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.ASCIIFoldingFilterFactory" />
    </analyzer>
    <analyzer type="query">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.ASCIIFoldingFilterFactory" />
    </analyzer>
</fieldType>

Both scenario does not works to search keyword in solr without accent character. Please describe cause of this issue. Thanks.

analysis screenshot

accent search screenshot

Subhash Chandra
  • 123
  • 1
  • 1
  • 8
  • Have you tried to analyse that field? – Oyeme Jul 25 '17 at 09:37
  • Enter the content to be indexed and query in the different boxes under "analysis" in the admin interface and see how the tokens are transformed for each step in the chain and what the end result is. – MatsLindh Jul 25 '17 at 13:05
  • Your config looks Ok. Try analyzing the field using the admin panel.. It would give you the insights – Jeeppp Jul 25 '17 at 14:59
  • In managed-schema file, I added all fields with custom type "string_ci" as below And then include tokenizer and filter factory under field type "string_ci" as mention above, '` So for accent keyword search, i selected field type "string_ci" in analysis section at admin interface as in screenshot – Subhash Chandra Jul 25 '17 at 15:22
  • Your screenshot indicates that everything is working as it should - the same token is produced on both sides and marked as a hit (different background color). Have you reindexed your content after changing the field definition? – MatsLindh Jul 26 '17 at 11:04
  • Yes, after configured above settings, i restarted solr service then re-indexed core data but still not able to search. – Subhash Chandra Jul 26 '17 at 15:25

0 Answers0