Skip to content

[BUG] fetch_size doesn't seem to work as described #241

@peter-iron

Description

@peter-iron

Describe the bug
Hitting the /_opendistro/_sql endpoint with fetch_size in the body does not return a cursor field in the response even when it should. Providing a negative value does generate an error, so it is being provided and parsed properly and simply doesn't seem to have any impact on the return.

To Reproduce
Steps to reproduce the behavior:

  1. Construct a basic query that returns more than 2 results in your local instance
  2. using the application/json header: POST {"query": $query, "fetch_size": 2}
  3. Observe that you see receive the full, normal (>2 docs) response without a cursor

Expected behavior
I would expect to receive only 2 docs in response with a cursor entry that I could use in a subsequent POST {"cursor": $cursor} call to obtain more results from the same query.

Plugins
Please list all plugins currently enabled.

Host/Environment (please complete the following information):

  • OS: macOS
  • Version 11.6

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions