geolexica / geolexica-server

Generalized backend for Geolexica sites
2 stars 1 forks source link

Fix handling multi-word search queries #131

Closed skalee closed 3 years ago

skalee commented 4 years ago

Right now we match designations against given search query by testing if the latter is a substring of the former. This works great with single-word queries, but not necessarily for multi-word ones.

Given example, resolution (of a sensor) term (639) will be returned for search queries like: resolution, sensor, res, sol, of a s, but not for: resolution of sensor (missing words), sensor resolution (reordered words), resolution of a sensor (missing parenthesis), or res sens (fragments of words, but that sequence does not appear in the designation). All of them seem quite likely to be entered.

I presume that a designation should match against given search query then and only then if every word of the search query is a substring of that designation.