Hi I wonder if someone could answer these two questions about spelling correction: 1) Is there any way you can get more than one spelling suggestion from get_spelling_suggestion(); 2) Can anyone confirm that any suggestion given won't necessarily return any results. Many thanks for a great product! Martin
Martin Hearn wrote:> 1) Is there any way you can get more than one spelling suggestion from > get_spelling_suggestion();Not currently, no.> 2) Can anyone confirm that any suggestion given won't necessarily > return any results.It is possible for a returned suggestion not to return any results. This is particularly likely if the default operator is AND - the corrected words will usually appear in the database, but they may not occur in the same document. If you have deleted documents from the database, it is even possible for the words suggested as spelling corrections not to exist in the database, since the spelling corrections are not automatically removed when a document is removed (though this is unlikely unless you've done many deletions, since the most frequent words are chosen as spelling corrections). -- Richard
Hi Continuing my investigation with spelling, I have a record with this data: "Harry Potter and the Goblet of Fire" delve -r 1237832 full Term List for record #1237832: Zand Zfire Zgoblet Zharri Zjk Zof Zpotter Zrowl Zthe and fire goblet harry id1237832 jk of potter rowling the Should I expect the spell checker to suggest this record if I search "Harry Porter Goblet" rather than "Harry Potter Goblet" (replacing a t in potter with r) At the moment it comes back with nothing at distances up to 10. If I search "hairy potter goblet" Xapian recommends fairyspotters. (Term List for record #676097: Zclibbon Zfairyspott Zguid Zmeg clibbon fairyspotters guide id676097 meg) Am I expecting the wrong things from this? Setting the stemming strategy and default op doesn't make any difference to the results. Many thanks Martin