Hi,
I'm trying to implement an autocomplete feature based on a filtered set of
documents.
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:
||ID||field||
|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,
pego
I'm trying to implement an autocomplete feature based on a filtered set of
documents.
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:
||ID||field||
|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,
pego