Skip to content

Some way to query "total" field from result set? #830

Closed
@ledjon

Description

@ledjon

I can't find a way to have this connector provide access to the "meta data" of the response set.

For example, a very efficient way to get the total count of an elasticsearch query is to simply find the "total" field in the json blob of the first page of results (assuming you are scrolling, etc.)

An example response form a scroll query:
{ u'_scroll_id': u'xxxx', u'_shards': { u'failed': 0, u'successful': 10, u'total': 10}, u'hits': { u'hits': [], u'max_score': 0.0, u'total': 1593020 }, u'timed_out': False, u'took': 3643}

Notice how it took 3 seconds (on a HUGE data set) and I can now use the "hits.total" value to return to the user.

Obviously actually getting the data then means a full fetch, but there are many use cases to simply get the count of the query first.

Ideas/thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions