Skip to content

Paging not working when use "query_string" #611

@montenegrodr

Description

@montenegrodr

Assuming my query is:

my_query = 'name:Dave'

The following script works fine. I got the 20th to 30th docs.

s = Search(....)
s = s.query('match', name='Dave')
r = s[20:30].execute()

But when I use query_string, the paging does not work. It returns always the top-10 results, no matter which slicing values I use.

s = Search(....)
s = s.query(Q('query_string', query='name:Dave'))  # tried without Q as well
r = s[20:30].execute()                             # this returns top-10 results

I've checked from/size params stored in s and they are well assigned (from=20, size=10). But it seems they are completely ignored when I use query_string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions