Page MenuHomePhabricator

Global advanced search only shows max. 100 results; pagination link ("Next") shown but empty
Closed, ResolvedPublic

Description

(Upstreaming from https://phabricator.wikimedia.org/T92960 )

Steps

  1. The (Maniphest) query https://secure.phabricator.com/maniphest/query/QpntSZ73PDm0/#R lists 114 results.
  2. The very same (global) query https://secure.phabricator.com/search/query/_e.FBzJiXvZA/#R lists the first 100 results.
  3. Click "Next" at the bottom to get to https://secure.phabricator.com/search/query/_e.FBzJiXvZA/?offset=100

Actual results
That page incorrectly says "No results returned for that query." instead of displaying the remaining 14 tasks.

Expected results

  • I'd expect the second page to display the remaining results.
  • If that's a performance issue, I'd expect some info displayed that the results are limited to 100 and not complete. Plus no "Next" button should be shown.

Event Timeline

aklapper raised the priority of this task from to Needs Triage.
aklapper updated the task description. (Show Details)
aklapper added a project: Search.
aklapper added a subscriber: aklapper.

Didn't look at the code yet but it seems like the offset is somehow counted double (try playing with the offset parameter). Decreasing/Increasing it by one will add/remove two results each.
To get the remaining 14 tasks you can do a offset=50 (which will skip the first 100 tasks).

epriestley triaged this task as Normal priority.May 21 2015, 2:25 PM
epriestley added a subscriber: epriestley.

Yeah, this is a bug with the interaction between offsets and limits in the underlying fulltext search query (which finds documents matching the search terms) and policy-aware, cursor-based paging in the application-level query (which filters out documents you can't see). I wasn't able to find a clean fix in 5 minutes of poking at it.

Ran into this today on this install. Seatrched for open/close tasks with term "javascript".
https://secure.phabricator.com/search/query/qi_sDFEgnw9i/#R

says there is a page 2, page 2 is empty. Hopefully this 2nd example helps diagnose the problem.

I'm only like 85% sure that D17667 really fixes things so yell if it still looks ~weird~.