Lucene fulltext search autocomplete

Viewed 40

I'm trying to implemetn autocomplete feature with Lucene.

For example I have the following values:

javascript-object
javascript-array
javascript-library
javascript

Right now, I configured Lucene index with whitespace analyzer.

When I use the following query: javascript* I expect javascript term to be on the first place. But in the result set - the javascript is not on the first place.

Please advise how to properly configure Lucene in order to get javascript on the first place when I use for example the following queries:

java*
javas*
javascript*
0 Answers
Related