How to use n-grams approximate matching with Solr?

前端 未结 2 2068
感动是毒
感动是毒 2021-02-05 21:58

We have a database of movies and series, and as the data comes from many sources of varying reliability, we\'d like to be able to do fuzzy string matching on the titles of episo

2条回答
  •  無奈伤痛
    2021-02-05 22:49

    The solution turned out to be very simple: AND was set as the default operator, and if any of the ngrams didn't match, the whole query failed. So, it was sufficient to add:

    
    

    in my schema definition.

提交回复
热议问题