nixos-search icon indicating copy to clipboard operation
nixos-search copied to clipboard

Search terms not respected

Open lheckemann opened this issue 3 years ago • 6 comments

If I search for "ipv6 privacy", I get results containing only ipv6 and results containing only privacy. But I only want results containing both, otherwise I'd do two searches! (or try "ipv6 OR privacy" as a search, no idea if that would then work as expected)

lheckemann avatar Feb 12 '21 12:02 lheckemann

Do you have example of a result which you would expect to be shown as a match for both?

I'm not entirely sure but I believe if there would be anything that has match for both words it would be scored higher so it would be one of the first results. So what you get might be the best we can do anyway. This will need to be more investigated and can potentially lead to new features like pattern search etc but knowing that we don't show the best match would help us to understand the severity of this.

turboMaCk avatar Feb 12 '21 12:02 turboMaCk

networking.interfaces.<name>.tempAddress, which contains both terms, is indeed the top result. I was hoping there might be more though, and now I have to go through the results only to find that none of them are relevant to what I'm looking for.

lheckemann avatar Feb 12 '21 12:02 lheckemann

I agree that we should make indications of matches better. Maybe this could be solved by simply highlighting the matches within text so it's easier to see where matches occurred for every result.

turboMaCk avatar Feb 12 '21 12:02 turboMaCk

That still requires opening all the results. I just don't want to be shown results that don't match my search terms.

lheckemann avatar Feb 12 '21 12:02 lheckemann

I'm having this issue too. For example https://search.nixos.org/packages?channel=21.05&from=0&size=1000&sort=relevance&query=obs-studio+plugin returns packages that don't contain "studio" or "obs". I tried "obs-studio" plugin and similarly got irrelevant results. I would much rather it shows no results (or maybe a clear deliminator before "partial matches") so that I don't waste my time looking through the results before realizing that they aren't relevant.

I'm pretty sure it used to work that like, but for a long time now has been showing irrelevant results.

kevincox avatar Jun 27 '21 15:06 kevincox

Yes, search terms were ANDed in the past, now the search is broken. I'm running into this bug constantly, please fix this.

Edit: It has now occurred to me that ANDed results are indeed included and shown at the top, but this was not obvious at all. The best and easiest way to fix this would be to remove the ORed results.

erikarvstedt avatar Aug 26 '21 14:08 erikarvstedt