Jguer / yay

Yet another Yogurt - An AUR Helper written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using multiple search terms returns a union of matches, rather than an intersection

AndydeCleyre opened this issue · comments

yay 1.95

Here are some searches that act surprisingly differently from yaourt:

Args Yaourt Results Yay Results
yay compiled 1 2
firefox kde 2 304
simple kde 21 1816
commented

In reality it doesn't even return an OR of the matches, it returns a number menu on each term. :shame:

  • yay <term1> <term2>has almost no practical utility right now versus writing yay <term1> and then yay <term2>
  • Narrowing the search further is useful.
  • It's simple enough to implement with almost no performance cost.

Will implement
Using strings.contains on each <>:
<term1.name> AND (<term2>.description OR <term2>.keywords) AND (<term3>.description OR <term3>.keywords) AND ... will probably return the best search results.

<term1.name OR term1.description> AND (<term2>.description OR <term2>.keywords) AND (<term3>.description OR <term3>.keywords) AND ... will probably return a broader result (hopefully not by much). To test.