So the problem you have is where to pull recommendations from. For my own needs, I use a spell checker to do the "did you mean", which means my data source is external, and thus I never hit the index twice.
No :-)
I definitely need to pull the recommendations from the Ferret index (or reimplement this bit of Ferret in Ruby). I can't use spell checker with an ordinary dictionary because the terms that are stored in my index (which is an index of Protein Databank File headers among other things) are often not ordinary words. I *could* build my own dictionary of all the words that are indexed, then loop through those and compute the levenstein distance for each - but that's obviously what query~ does (it must query a Ferret dictionary to find the matches with a levenstein distance less than foo, then create a query that does word1 or word2 or word 3...), so it seems extraordinarily silly (not to mention slow) to reimplement (in Ruby) something that is already in Ferret.
My question really is whether access to this information is exposed throught the Ferret API. I think a Ferret developer is needed to answer this question.
I'm very surprised that I'm the first person (AFAICT from searching the mailing list archive) to ask this question.
-Rob _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

