How to match against subsets of a search string in SOLR/lucene

前端 未结 3 2028
無奈伤痛
無奈伤痛 2020-12-17 02:15

I\'ve got an unusual situation. Normally when you search a text index you are searching for a small number of keywords against documents with a larger number of terms.

3条回答
  •  无人及你
    2020-12-17 03:03

    only setting mm parameter will not satisfy your needs since

    "the quick brown fox jumps over the lazy dog"

    will match all three documents

    • "quick brown"
    • "fox over"
    • "lazy dog"

    and as you said:

    I'd like to find the documents that have a phrase that occurs in the query. In this case "quick brown" and "lazy dog" (but not "fox over" because although the tokens match it's not a phrase in the search string).

提交回复
热议问题