lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Israel Tsadok <itsa...@gmail.com>
Subject Re: Analyzer which creates terms of one to n words
Date Thu, 07 Apr 2011 09:04:58 GMT
Take a look st
http://lucene.apache.org/java/3_0_3/api/contrib-analyzers/org/apache/lucene/analysis/shingle/package-summary.html

On Thu, Apr 7, 2011 at 11:30 AM, Clemens Wyss <clemensdev@mysign.ch> wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message