Configure SOLR to find documents if the plural is used in the document, and the singular in the search text?

后端 未结 2 1991
不思量自难忘°
不思量自难忘° 2020-12-31 14:56

I am using solr, set up at localhost:8983 I am basically using the out of the box example. I have entered one document with a name \"Car\", and another with a name \"Cars\".

2条回答
  •  时光取名叫无心
    2020-12-31 15:41

    It is possible, just add porter filter at the end (after LowerCaseFilterFactory):

    
    

    Read more:

    1. Snowball docs with example of use in analyser
    2. Solr LanguageAnalysis
    3. The English (Porter2) stemming algorithm

    If there is no special need, I would not divide analyser to index and query time. Your query time analyser looks perfectly good to use it in both cases.

提交回复
热议问题