Lucene - Wildcards in phrases

前端 未结 7 932
小鲜肉
小鲜肉 2021-01-04 11:50

I am currently attempting to use Lucene to search data populated in an index.

I can match on exact phrases by enclosing it in brackets (i.e. \"Processing Documents\"

相关标签:
7条回答
  • 2021-01-04 12:19

    Not only does the QueryParser not support wildcards in phrases, PhraseQuery itself only supports Terms. MultiPhraseQuery comes closer, but as its summary says, you still need to enumerate the IndexReader.terms yourself to match the wildcard.

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