openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Add support for solr spell checking ("Did you mean?")

Open bicolino34 opened this issue 3 years ago • 2 comments

Currently, search is too strict with letters. Compare Безпека життєдіяльності and Безпека життєдіяльност. With just one letter missing ( і ) there are no results. This possibly can be solved by solr spell checking feature https://solr.apache.org/guide/8_11/spell-checking.html

Stakeholders

@cdrini

bicolino34 avatar Aug 31 '22 11:08 bicolino34

Hey can I work on this

kushalShukla-web avatar Aug 31 '22 15:08 kushalShukla-web

While the "Did you mean" spellcheck feature may be valuable in certain cases, I think for the stated use case using fuzzy search with an edit distance would be a better solution.

https://solr.apache.org/guide/8_11/the-standard-query-parser.html#fuzzy-searches

And, I'd consider this more a bug fix than a feature request. All modern search implementations handle this case with ease.

tfmorris avatar Aug 31 '22 18:08 tfmorris

Hello! I've worked on a few other Solr issues, and I'd love to give this one a shot, if you'd assign me to the task. Is the plan to go for the 'fuzzy search' approach, to leverage Solr's spell-checker, or both?

benbdeitch avatar Feb 27 '24 19:02 benbdeitch

There's a bit of research/experimenting here, I reckon. Thinking/experimenting with strategies for both might be the way to go!

As a note here are the updated docs links:

  • https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html
  • https://solr.apache.org/guide/solr/latest/query-guide/standard-query-parser.html#fuzzy-searches

It might also be worth looking at some books to see if there are any strategies for this. I've had success with the O'Reilly books on solr in the past. Note that my public library gives me free access to the O'Reilly catalogue, so maybe check it that's the case for you!

cdrini avatar Feb 27 '24 22:02 cdrini