website icon indicating copy to clipboard operation
website copied to clipboard

Search: '&' vs 'and' vs ' and '

Open mal-tee opened this issue 5 years ago • 3 comments

Okay:

image image

Not so great:

image

mal-tee avatar Nov 08 '20 13:11 mal-tee

I am not sure if there is anything we can improve here. 1and1 only matches because of the URLs in the web and sources properties of those records, not because of the 1&1 in the name.
Thus: If you know a keyword that users will use to search for a company but that isn't included in the name (or one of the other fields we search), our current implementation requires adding that to the runs key.

If you really expect 1 and 1 to match, we would need to introduce an additional (computed) field that does some processing, like:

  • common character to word replacements (like & -> and, or the other way around) but no idea how to handle i18n in that case
  • additionally surround special chars with spaces (1&1 -> 1 & 1)
  • probably run the first thing again for your search to actually work.

I don't think that is feasible. You would probably be better off asking Typesense to implement the features you are looking for. Related:

  • https://github.com/typesense/typesense/issues/95#issuecomment-586542829
  • https://github.com/typesense/typesense/issues/122

baltpeter avatar Nov 08 '20 13:11 baltpeter

Also semi-related and a great request: https://github.com/typesense/typesense/issues/133

baltpeter avatar Nov 08 '20 13:11 baltpeter

With https://github.com/datenanfragen/data/pull/1705, we're most of the way there.

Now, we're only waiting for https://github.com/typesense/typesense/issues/133.

baltpeter avatar Mar 17 '22 23:03 baltpeter