asynchronous-search icon indicating copy to clipboard operation
asynchronous-search copied to clipboard

Typed Keys Response param added in Get Asynchronous Search API

Open eirsep opened this issue 4 years ago • 2 comments

Signed-off-by: Surya Nistala [email protected]

Description

Adds the typed_keys response param in Get Asynchronous Search API. Now we can pass typed_keys param in both Submit and Get Asynchronous Search APIs and plugin will honor it.

Issues Resolved

https://github.com/opensearch-project/asynchronous-search/issues/46

Testing

  1. typed_keys is false
% curl "http://localhost:9200/_opendistro/_asynchronous_search/$aid?pretty"                   
{
  "id" : "FnA1c1ZlQmFqUVMyRFFXb3c1NnZyT1EDMTgxFDJOa0FkSHdCTHJLMnhuNVVBOUhMATE=",
  "state" : "STORE_RESIDENT",
  "start_time_in_millis" : 1634033730515,
  "expiration_time_in_millis" : 1634120130515,
  "response" : {
    "took" : 4,
    "timed_out" : false,
    "_shards" : {
      "total" : 1,
      "successful" : 1,
      "skipped" : 0,
      "failed" : 0
    },
    "hits" : {
      "total" : {
        "value" : 6,
        "relation" : "eq"
      },
      "max_score" : null,
      "hits" : [ ]
    },
    "aggregations" : {
      "unique_skus" : {
        "value" : 0
      }
    }
  }
}

  1. 'typed_keys' is true
% curl "http://localhost:9200/_opendistro/_asynchronous_search/$aid?pretty&typed_keys=true"
{
  "id" : "FnA1c1ZlQmFqUVMyRFFXb3c1NnZyT1EDMTgxFDJOa0FkSHdCTHJLMnhuNVVBOUhMATE=",
  "state" : "STORE_RESIDENT",
  "start_time_in_millis" : 1634033730515,
  "expiration_time_in_millis" : 1634120130515,
  "response" : {
    "took" : 4,
    "timed_out" : false,
    "_shards" : {
      "total" : 1,
      "successful" : 1,
      "skipped" : 0,
      "failed" : 0
    },
    "hits" : {
      "total" : {
        "value" : 6,
        "relation" : "eq"
      },
      "max_score" : null,
      "hits" : [ ]
    },
    "aggregations" : {
      "cardinality#unique_skus" : {
        "value" : 0
      }
    }
  }
}

Check List

  • [Y] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

eirsep avatar Oct 12 '21 10:10 eirsep

What should we do with this PR?

dblock avatar Apr 19 '22 21:04 dblock

Anyone looking in to this PR? @eirsep @Bukhtawar @bharath-techie

bbarani avatar Sep 25 '23 18:09 bbarani

Looks like there was no followup on the test ask, closing as stalled.

[Catch All Triage - Attendees 1, 2, 3, 4, 5]

dblock avatar Jul 01 '24 16:07 dblock