IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
202 stars 80 forks source link

Question about Elastic fuzziness feature #563

Open mkhattat opened 10 months ago

mkhattat commented 10 months ago

I know that the developers of Snostorm decided not to have the fuzziness in the Snomed search API. I read the reason behind it in a different issue. I respect that.

But I have a case that I still need to show relevant results even if there is a spelling error. For example, searching for concepts with the query alzimer should still show the Alzheimer disease term.

Do you have any suggestion how can I achieve this in Snomed?

kaicode commented 10 months ago

I can suggest a workaround for now: Snowstorm Lite has fuzzy matching. Enable it by including a tilde character at the end of the ValueSet filter search string.

For example: /fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/%3C%3C404684003|Clinical%20finding|&count=20&filter=alzimer~

Non-production demo server here: https://snowstorm-lite.nw.r.appspot.com/fhir/ValueSet/$expand?url=http://snomed.info/sct?fhir_vs=ecl/%3C%3C404684003|Clinical%20finding|&count=20&filter=alzimer~

.. Lucene based search often takes around 20 times longer with fuzzy matching compared to without. I would suggest running search without fuzzy matching first and if there are no results then perhaps automatically run a fuzzy search?