Forum: Ferret doubts in ferret

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
golak Sarangi (Guest)
on 2007-07-26 18:01
(Received via mailing list)
I am using ferret to build a search application for my site. I used
stemming
analyzer to build the index. When i searched "market" i get hits but on
searching "marketing" i get no hits,while there are fields containing
the
word marketing. I am using stemming analyzer even while searching. Is
the
problem with the analyzer? Or am I missing out something
Andreas K. (Guest)
on 2007-07-26 21:26
(Received via mailing list)
On 26.07.2007, at 16:01, golak Sarangi wrote:

> I am using ferret to build a search application for my site. I used
> stemming analyzer to build the index. When i searched "market" i
> get hits but on searching "marketing" i get no hits,while there are
> fields containing the word marketing. I am using stemming analyzer
> even while searching. Is the problem with the analyzer? Or am I
> missing out something

Doubt in yourself before you doubt in Ferret ;)

Check if your stemming analyzer is actually used for both indexing
and searching.

Start with an empty index and add a simple document. Open an
IndexReader on the index and examine the terms using IndexReader#terms
(). The index should only contain stemmed terms.

Make sure the stemming analyzer is used for searching as well. Call
Index#process_query() with a query of your choice. This returns the
parsed (and hence analyzed) query. Here, too, all terms should be
stemmed.

If either one doesn't work as expected, you have the wrong analyzer
in place.

HTH,
Andy
This topic is locked and can not be replied to.