lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Wyss <clemens...@mysign.ch>
Subject Analyzer which creates terms of one to n words
Date Thu, 07 Apr 2011 08:30:50 GMT
Is there an analyzer which takes a text and creates search terms based on the following rules:
- all single words
- "two words in a row"
- "three word in a row"
- ...
- "n words in a row"

The reason is the following: 
I have an index which is now being analyzed using WhitespaceAnalyzer. Besides that I have
a so called "term index" which is populated with all (search) terms of the "real index". The
"term index" is used to provide suggestion for search terms. Typing a single search term workls
perfectly. The problem is that  when I type two words to narrow the suggestions no more possible
serach terms are found, BECAUSE the "term index" only has single words/terms.

Which analyzer should I use? Ngram? Or is there even an analyzer which does the above?

Thanks for your advices!
Clemens

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message