Solr wildcard searching

前端 未结 1 1243
日久生厌
日久生厌 2021-01-18 00:14

If I have a record with keywords Chris Muench, I want to be able to match Mue or Chr. How can I do this with a solr query. Currently I do the following:

$res         


        
相关标签:
1条回答
  • 2021-01-18 00:28

    You need to either use wildcard queries e.g. chr* or mue* which would match.
    This would either client to either enter the query in this format or modifying it in the application.
    Else, you can generate tokens using solr.EdgeNGramFilterFactory and this would match the records. e.g. chris would generate ch, chr, chri, chris and hence would match all these combination.

    0 讨论(0)
提交回复
热议问题