Skip to content

Forbids scroll query that sets size to 0 #22552

@jimczi

Description

@jimczi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions