Is there a way to get a list of results so that you also get, for each
result, the phrase that was successfully matched?  If so, you could shove
all the results into a hash, with the keys being the matched phrase (and the
value for each being an array of results), and return the asked-for key's
array along with the key and value size for the largest other array.

just thinking aloud...i'd like to be able to do this as well, i don;t know
if you can get back that info though.

2008/6/11 Julio Cesar Ody <[EMAIL PROTECTED]>:

> > Ideally I'd like to get the number of matches for those similar words,
> but I
> > know I could just do a search for each of those to get it.
>
> And I think it might have to boil down to that really. If you want to
> get a the *number of results* for 'transferase' when someone searches
> for 'transferaze', then it means you'll need to hit the index once
> more with 'transferase' in separate.
>
>
> On Wed, Jun 11, 2008 at 7:06 PM, Robert Hulme <[EMAIL PROTECTED]> wrote:
> > Is there a way to get a list of similar words to the ones a user has
> > searched for?
> >
> > So if they search for (in my case) transferaze which has no matches I can
> > get back an array like this ['transferase'] ?
> >
> > I know I can just add ~ on the end to make it fuzzy, but what I'd like is
> to
> > be able to say "Sorry, no matches for 'transferaze'. Did you mean
> > 'transferase' (310 matches)?"
> >
> > Ideally I'd like to get the number of matches for those similar words,
> but I
> > know I could just do a search for each of those to get it.
> >
> > Is this possible?
> >
> > -Rob
> > _______________________________________________
> > Ferret-talk mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/ferret-talk
> >
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
>
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to