Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Short-circuit correctly in search_expanded #1792

Merged
merged 1 commit into from
Nov 18, 2016

Conversation

tsibley
Copy link
Contributor

@tsibley tsibley commented Nov 18, 2016

The total will always be the number of documents matched, not the number
of documents returned for the given page. Instead, do what
search_collapsed does and check if we have any distributions.

Additionally, guard search_descriptions against an empty id list, which
produces invalid queries.

I found these while tracking down the cause of thousands of 500s on
/file/_search, ultimately being triggered by a web crawler.

The total will always be the number of documents matched, not the number
of documents returned for the given page.  Instead, do what
search_collapsed does and check if we have any distributions.

Additionally, guard search_descriptions against an empty id list, which
produces invalid queries.

I found these while tracking down the cause of thousands of 500s on
/file/_search, ultimately being triggered by a web crawler.
@tsibley tsibley force-pushed the tsibley/malformed-file-search branch from 1418a7a to 5e259db Compare November 18, 2016 17:00
@coveralls
Copy link

coveralls commented Nov 18, 2016

Coverage Status

Coverage remained the same at 70.123% when pulling 5e259db on tsibley/malformed-file-search into 3f4f5c6 on master.

@tsibley
Copy link
Contributor Author

tsibley commented Nov 18, 2016

This is now passing that I've tidied.

@oalders oalders merged commit f0833fb into master Nov 18, 2016
@oalders oalders deleted the tsibley/malformed-file-search branch November 18, 2016 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants