lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Gößweiner <>
Subject Autocomplete (suggest) functionality that ignores terms order
Date Sun, 21 Apr 2019 20:35:56 GMT

I'm trying to implement an autocomplete feature based on a filtered set of

A user enters multiple terms (separated by space) in an input field and
will get some word suggestions only for the last word entered. All the
words before the current/last word should be used as filter criteria. The
last/current word entered will be auto suggested.

Documents in my index:

|1|The quick brown fox was seen in this country|
|2|The fox is quick and has brown dots.|
|3|The fish is quick and it's colour is brown.|
|4|Many peope saw the falcon in the sky|

i.e. a users enters the following text in an autocomplete input field: The
brown f

The auto complete dropdown should suggest terms like 'fox', 'fish'.

The query for filtering the documents should be like (stopwords are ignored
in this example)

+field:the +field:brown

How would you guys realize this requirement in Lucene?

Thx in advance - best regards,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message