On Fri, Sep 08, 2006 at 03:24:27PM +0900, David Balmain wrote:
> On 9/8/06, Maxime Curioni <[EMAIL PROTECTED]> wrote:
> > Hello Dave,
> > Sorry for responding so late. I am actually using Ferret via the
> > acts_as_ferret Rails plugin.
> >
> > I have a problem with small words, especially when I search for them
> > between quotes. For example, I have indexed the following sentence:
> > "e-commerce growth strategy for a major business to leverage key
> > intangible assets"
> >
> > When I search for the sentence '"for a"' (not just 'for AND a' but the
> > sentence "for a"), I don't get any results.
> 
> Hi Maxime,
> It's not the length of the words that is the problem. If you did a
> search for "cat" it would find it. The problem is that the default
> analyzer which you are using removes common stop-words like "and",
> "the", "a" and "for". You can create a StandardAnalyzer that doesn't
> remove stopwords like this;
> 
> include Ferret::Index
> include Ferret::Analysis
> 
> index = Index.new(:analyzer => StandardAnalyzer.new([]))

or, with aaf:
acts_as_ferret :analyzer => StandardAnalyzer.new([])

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

Reply via email to