Search for and highlight only exact matches

Only text that exactly matches Petalostelma should be highlighted, but Petalostemon, Petalostigma are shown highlighted here. (This is the case for all header search queries, as well as for taxa, users, projects and places. This is just an example.)

A search for “Petalostelma”, with quotes, should only show results that exactly match that term, not fuzzy match.

3 Likes

The highlighting is strange, but I’m also wondering about the non-exact matches part. I tried putting my search term in quotes, but that still wouldn’t force an exact match. The whole thing seems fishy to me…

2 Likes

Added an issue here: https://github.com/inaturalist/inaturalist/issues/2516

1 Like

The issue was closed, since it’s actually working as intended. So I moved this one from Bug Reports to Feature Requests. Comments from Github:

kueda:

Perhaps this is a misconception about what the highlights are: they are what terms the search engine matched given the query, not necessarily exact matches. Even more specifically they are the terms matched from the exact taxon names, autocomplete fields (which are generally matches against the beginning of the term only, e.g. “dog” would match “Dogmites” but not “Iconodog”), and descriptions (which I think might match any substring).

bouteloua:

Ah. Hm. It probably needs to be clearer when it’s exactly matching vs. fuzzy matching then.

1 Like