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

Scan not counted against query total in search stats #9109

Closed
pickypg opened this issue Dec 30, 2014 · 2 comments
Closed

Scan not counted against query total in search stats #9109

pickypg opened this issue Dec 30, 2014 · 2 comments
Assignees
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement v2.0.0-beta1

Comments

@pickypg
Copy link
Member

pickypg commented Dec 30, 2014

Running a search with search_type as scan does not get counted against the query total.

$ curl -XGET 'localhost:9200/test/_search?search_type=scan&scroll=1m&pretty' -d '{
  "query": { "match_all": {}},
  "size":  1000
}'
{
   "_scroll_id": "c2NhbjsxOzE5NDk6YWw2M3lVOGpTUjY2LVhFZGFhVW9JQTsxO3RvdGFsX2hpdHM6MTs=",
   "took": 10,
   "timed_out": false,
   "_shards": {
      "total": 1,
      "successful": 1,
      "failed": 0
   },
   "hits": {
      "total": 1,
      "max_score": 0,
      "hits": []
   }
}

$ curl -XGET localhost:9200/test/_stats?pretty
{
  ...
          "search": {
            "open_contexts": 2,
            "query_total": 0,
            "query_time_in_millis": 0,
            "query_current": 0,
            "fetch_total": 0,
            "fetch_time_in_millis": 0,
            "fetch_current": 0
         },
  ...
}

The number of open contexts increases with the number of open scans, but there's no way to capture this unless you happen to catch the "open_contexts" incrementing because it is not cumulative.

Perhaps a few things should probably happen:

  • The actual query should be counted.
  • Total number of scrolls should be maintained (scroll_total and scroll_current).
  • The amount of time that scrolls were held open (e.g., scroll_time_in_millis_total).
@eeeebbbbrrrr
Copy link

As a paying customer, please make this happen in 2.0. Please please please please please please please please please.

@ghost
Copy link

ghost commented Jul 7, 2015

Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs >enhancement v2.0.0-beta1
Projects
None yet
Development

No branches or pull requests

4 participants