On Fri, Jan 12, 2007 at 01:05:14AM +0100, Ewout wrote:
> Depends on how you produced your query. In general, your query has to
> pass through the same analyzer that was used for indexing.
>
> So, when building a PhraseQuery, for instance, you have to get each word
> from the analyzer.
>
> keywords.each {|keyword|
> query = Search::PhraseQuery.new(:fieldname)
> analyzer = StemmedAnalyzer.new
> tokenizer = analyzer.token_stream(:fieldname, keyword)
> while (token = tokenizer.next)
> query << token.text
> end
> }
>
> This is how I do it, it would be nicer if AAF would encapsulate this.
it should do this, if it doesn't, I'd consider this a bug. There have
been problems with stop words in the past, but these should finally be
sorted out in current trunk.
Jens
--
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk