Lucene.Net fuzzy search speed

后端 未结 1 414
渐次进展
渐次进展 2021-01-28 05:25

Sorry for the concern, but I hope to get any help from Lucene-experienced people.

Now we use in our application Lucene.Net 3.0.3 to index and search by ~2.500.000 items.

相关标签:
1条回答
  • 2021-01-28 05:40

    You can improve the speed of Fuzzy Queries by setting their prefix length to a non-zero value. This will allow lucene to narrow the set of possible results efficiently. Like this:

    queryParser.FuzzyPrefixLength = 2;
    

    Also, it doesn't affect the query you've provided as an example, but if you care at all about performance, you should remove the line queryParser.AllowLeadingWildcard = false;. Leading wildcards will absolutely kill performance.

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