SOLR and accented characters

后端 未结 3 2038
生来不讨喜
生来不讨喜 2021-01-27 07:12

I have an index for occupations (identifier + occupation):




        
3条回答
  •  一个人的身影
    2021-01-27 07:36

    Just add solr.ASCIIFoldingFilterFactory to your filter analyzer chain or even better create a new fieldType:

    
    
       
        
        
        
        
        
      
    
    

    This filter converts alphabetic, numeric, and symbolic Unicode characters which are not in the Basic Latin Unicode block (the first 127 ASCII characters) to their ASCII equivalents, if one exists.

    This should let you to match the search even if the accented character is missing. The downside is that words like "cañon" and "canon" are now equivalent and both hit the same documents IIRC.

提交回复
热议问题