开发者

full text search to provide efficient search using java [closed]

开发者 https://www.devze.com 2023-03-06 18:15 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help c开发
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help c开发者_运维百科larifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

i have a table where it has 80+ millions of records. i need to provide full text search capability. i know that we can use hibernate search (Lucene). i request you to give any other option other than lucene indexing.

Thanks, Reddy


What data base system are you using? MySQL has FULLTEXT indexing. SQLite has FTS (fast text search) tables. Microsoft SQL Server has full-text indexes. And on and on...


There are lots of libraries for this.

Using plain Java you can create a NavigableMap<String, Set<Record>> where the key is all the search-able strings from start at the first, second, third etc character.

If you just want word matches, that will be much more efficient, and you can use the same structure.

Note: This is likely to use a lot of memory, but is simple.

0

精彩评论

暂无评论...
验证码 换一张
取 消