Header Search can't do exact matches

Mentioned here, but I think it’s really a different issue, so I’m opening a new thread.

Let’s say I’m looking for all species/subspecies in the genus Genetta. The old search works perfectly on the first try:

But using the new search, there’s no way to limit to the genus Genetta. I can choose to restrict just to taxa, but here’s what I get:

A mix of the 21 taxa I actually want, plus an additional 42(!) taxa I don’t want. For some, I can at least see why they fuzzy-matched from the highlighting, but for some, like Cytisus scoparius, I can’t even tell why it matched until I go to the taxon page (the French common name).

I tried using quotes to force an exact match on the string genetta, but it still returns the same set of 63 results, the only difference is that the first two hits are reversed.

For me, this really breaks the ability to use the new search for taxon searching, so I hope either it gets fixed, or the old search stays available.

4 Likes

The new search is more helpful if you’re not sure what you’re looking for, but the results really need to be ordered by relevance. So something like exact matches, followed by partial matches, followed by fuzzy matches, would improve things a lot.

3 Likes

(changed title to “Header Search” to clarify what is being referred to)

I’m not sure this qualifies as a bug, since I’m pretty sure it’s working as designed - it’s different than the search at https://www.inaturalist.org/taxa/search If you have suggestions for how the header search should order results, probably best to make a feature request. I don’t believe there’s any plan to remove https://www.inaturalist.org/taxa/search

In the least snarky way possible, I’m failing to see how someone would intentionally design a search that treated genetta and “genetta” differently, but only in that the first two hits switched places.
In nearly all search contexts that I’m aware of, putting the search term in quotes forces an exact match in the results.

1 Like

OK, I received confirmation that the way the header search is designed is that it looks for exact matches, and it treats quotes the same as any other character. So if you enter Genetta it searches for Genetta. If you enter "Genetta" it searches for “Genetta”, including the quotes, which is why the results are different. So it’s not a bug.

Making quotes function the same way they do in other search engines would be preferable, but from what I’m told it would require deep changes to the search functionality, which is not trivial.

Huh. Well that’s good to know, but somewhat disappointing.
By “not trivial” do you mean that a feature request wouldn’t be of any use?

1 Like

No a feature request is fine, I was just trying to get across it’s likely not something that would be implemented quickly.

1 Like

I’m not sure if I should start a different thread, but I ran into another example of odd matching behavior from the search that I don’t understand. Maybe you can help me?

Partial matching and fuzzy matching are both things the search currently does – so tamias returns both neotamias and tamiamiensis. It also returns tamiasciurus.
Why does sciurus not return tamiasciurus?

1 Like

It just searches from the beginning of the string, so for tamias finding neotamias, it’s matching on the scientific name synonym of tamias which is listed under neotamias.

sciurus doesn’t find tamiascirus since it starts in the middle of the string (and there is no scientific name synonym that starts with sciurus under tamiasciurus)

I rolled the exact matching with quotes into this feature request: https://forum.inaturalist.org/t/search-for-and-highlight-only-exact-matches/670

so I’ll close this report