-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
I think there is a defect in QueryChanges or in the Gerrit REST API.
Consider a query that is constructed with multiple filters such as the one documented in the REST API:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
In an example there under Request we find:
GET /changes/?q=is:open**+**owner:self&q=is:open+reviewer:self+-owner:self&q=is:closed+owner:self+limit:5&o=LABELS HTTP/1.0
Notice that the + is a literal + ascii.
However, when performing a query using the go-gerrit API, the + is translated into %2B
However, the Gerrit API does not recognise this and returns an empty result set.
Note that the query parameters sent in, are unrelated independent queries. They are not added together. I suspect this causes further confusion - potentially that is a separate bug, since I assumed something different and got some Json un-marshalling bugs ...
I think this needs a cleanup. Personally I would prefer a simpler interface and focus on just one query, but of course the question is how to model the query language. Is each query an AND or an OR etc.
Hope this makes sense to you.