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

Forbids scroll query that sets size to 0 #22552

Closed
jimczi opened this issue Jan 11, 2017 · 3 comments
Closed

Forbids scroll query that sets size to 0 #22552

jimczi opened this issue Jan 11, 2017 · 3 comments
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@jimczi
Copy link
Contributor

jimczi commented Jan 11, 2017

A scroll query like the following:

POST _search?scroll=1m
{
  "size": 0
}

... returns no hit but subsequent queries with the returned scroll id will replay the entire query even though there is no hits to return.
It would be better to throw an exception on the initial query in order to forbids scroll query with size:0.

Relates #22500

@nik9000
Copy link
Member

nik9000 commented Jan 11, 2017

Makes sense to me. We allow -1 because that means "all". And we allow 0 for regular search because that means "none" but "none" doesn't make sense with scroll.

@jpountz
Copy link
Contributor

jpountz commented Jan 15, 2017

+1

@liketic
Copy link

liketic commented Oct 13, 2017

Hi @jpountz Is this still worth to contribute? Thanks.

liketic added a commit to liketic/elasticsearch that referenced this issue Dec 15, 2017
martijnvg added a commit that referenced this issue Dec 18, 2017
* es/6.x: (170 commits)
  Allow TrimFilter to be used in custom normalizers (#27758)
  recovery from snapshot should fill gaps (#27850)
  Remove unused class PreBuiltTokenFilters (#27839)
  Reject scroll query if size is 0 (#22552) (#27842)
  Mutes ‘Rollover no condition matched’ YAML test
  Make randomNonNegativeLong() draw from a uniform distribution (#27856)
  Adapt rest test after backport. Relates #27833
  Handle case where the hole vertex is south of the containing polygon(s) (#27685)
  Move range field mapper back to core
  Fix publication of elasticsearch-cli to Maven
  Do not use system properties when building the HttpAsyncClient (#27829)
  Optimize version map for append-only indexing (#27752)
  Add NioGroup for use in different transports (#27737)
  adapt field collapsing skip test version. relates #27833
  Add version support for inner hits in field collapsing (#27822) (#27833)
  Clarify that number of threads is set by packages
  Register HTTP read timeout setting
  Fixes Checkstyle
  Remove `operationThreaded` from Java API (#27836)
  Fixes failing BytesSizeValues tests
  ...
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Scroll labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

5 participants