Always use the smallest limit: in a query

If there are multiple limit operators in the same AND node,
pick the one with the smaller value as the rewritten result.
This way if a user puts "limit:5" in a search query we only
show them 5 results, even if their page size was bigger.

This however may break pagination in the web UI because we
don't detect the limit as the page size.

Change-Id: Id6e7494d7753f72ddaa9a5cfa4fda694bd540001
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed