[aur-dev] pkgbase queries via RPC interface
kachelaqa at gmail.com
Sat Aug 16 15:46:11 EDT 2014
On 16/08/14 20:20, Lukas Fleischer wrote:
> On Sat, 16 Aug 2014 at 21:04:05, kachelaqa wrote:
>> The only other thing that can't be fully implemented on the client side
>> is negation. It's possible to exclude terms if they are combined with at
>> least one other positive term. For instance, to search for "foo" AND NOT
>> "bar", you can first search for "foo" and then do some post-filtering on
>> the client side to exclude "bar". But what if you wanted to search for
>> *all* packages that do not contain "bar"? This is currently impossible,
>> because you'd need to pull the entire package list before it could be
>> filtered on the client-side. So I would like to suggest adding something
>> like an "narg" parameter to complement the "arg" parameter, to allow for
>> the possibility of a list of terms to be excluded from the search results.
> Just out of curiosity, can you give an example of such a negative query
> that would result in a result set with less than 5000 packages? I am
> asking because queries with results of more than 5000 packages fail.
I think I see what you're getting at: my actual example is somewhat
contrived, because "bare" negations are probably a quite rare use-case.
However, you've pointed at a much better use-case: searching for "foo"
alone might exceed the 5000 limit, but searching for "foo" AND NOT "bar"
could often help keep it below that limit. So, really, "bare" negations
are just the most extreme example of that.
> Having said that, I think that having something like narg is a good
> idea. It is easy to implement and has real use cases.
More information about the aur-dev