简体   繁体   中英

Lucene suggest phrases

I have an index with text masses like:

"Hello I want to try autocomplete xxx yyy zzz"

Is it possible to get suggestions such that, if I type:

--------------------------------------------------------------------
| I typed                    | Suggestion                          |
====================================================================
| autocomplete x             | autocomplete xxx                    |
--------------------------------------------------------------------
| auto                       | autocomplete                        |
--------------------------------------------------------------------
| Hello I want to try auto   | Hello I want to try  autocomplete.  |
--------------------------------------------------------------------

So it suggests words based on what is actually after the first word, and won't suggest the words that are before the words I suggest either.

Using lucene 4.4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM