Problem with searching plurals (with apostrophe)

hello guys,

i am using acts_as_ferret plugin(0.4.1 Latest) with ferret gem(0.11.4
on rails 1.2.5 and ruby 1.8.6(UBUNTU Gutsy)
i have this
:Stores Model
acts_as_ferret :fields => {:name => { :boost => 2 ,:store => :yes},
:short_desc => { :boost => 1.5,:store =>
:yes },
:tag_list => {:boost => 1 },
:name_for_sort => {:index => :untokenized}

and i search using this code in my Stores controller

@products = Store.find_by_contents params[:q].to_s.upcase+“*”

for e.g i have a Stores with name as
“benhank’s coffee outlet”

when i search for “benhank” i get the resultant store as expected.
but when i search with param as “benhank’s” or “benhanks” —
i dont get anyresults.
atleast i shud have got the result for search with “benhank’s”
which is actually what is entered in :name field

how can i get this done. pls help
i have been trying to understand to use the analysers and tokenisers
but couldn’t get through.also looking at wildcardquery and fuzzy



Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now.;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


your problem is pretty much analyzers and tokenization related, so you
really should understand what happens there.

Tried the Ferret short cut pdf book from o’reilly?

In general you’ll need a stemming analyzer to strip plural endings from
words. Regarding the “'” - it’s a question of the tokenizer you’re using
whether the 's ending is considered to be part of the word it follows,
or ‘s’ is interpreted as a term of it’s own.


On Thu, Nov 15, 2007 at 10:56:12PM -0800, Jagdish rao wrote:

:yes },

Ferret-talk mailing list
[email protected]

Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] |

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa