Build an index for substring search?

后端 未结 3 1985
醉话见心
醉话见心 2021-01-05 11:16

I want to do general substring search among billions of strings. The requirement is a little different from general fulltext search because I want a query \"ubst\" also can

3条回答
  •  心在旅途
    2021-01-05 12:11

    Best index structure for this case is suffix tree Lucene does not implements this type of index so its substring search is slow. But lucene has prefix tree index which mean you can do fast search if you search terms by their prefix.

提交回复
热议问题