Document search on partial words

后端 未结 1 604
眼角桃花
眼角桃花 2021-01-02 02:13

I am looking for a document search engine (like Xapian, Whoosh, Lucene, Solr, Sphinx or others) which is capable of searching partial terms.

For example when search

相关标签:
1条回答
  • 2021-01-02 02:48

    With lucene you would be able to implement this in several ways:

    1.) You can use wildcard queries *brit* (You would have to set your query parser to allow leading wild cards)

    2.) You can create an additional field containing N-Grams of all the terms. This would result in larger indexes, but would be in many cases faster (search speed).

    3.) You can use fuzzy search to handle typing mistakes in the query. e.g. someone typed britnei but wanted to find britney.

    For wildcard queries and fuzzy search have a look at the query syntax docs.

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