---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
search with search_after parameter:
- do:
    indices.create:
      index: "test"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    index:
      index: "test"
      id: "1"
      body:
        id: 1
        foo: "bar"
        age: 18
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    index:
      index: "test"
      id: "42"
      body:
        id: 42
        foo: "bar"
        age: 18
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    index:
      index: "test"
      id: "172"
      body:
        id: 172
        foo: "bar"
        age: 24
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    indices.refresh:
      index: "test"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    search:
      rest_total_hits_as_int: true
      index: "test"
      body:
        size: 1
        query:
          match:
            foo: "bar"
        sort:
        - age: "desc"
        - id: "desc"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._id: "172"
- match:
    hits.hits.0.sort:
    - 24
    - 172
- do:
    search:
      rest_total_hits_as_int: true
      index: "test"
      body:
        size: 1
        query:
          match:
            foo: "bar"
        sort:
        - age: "desc"
        - id: "desc"
        search_after:
        - 24
        - 172
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._id: "42"
- match:
    hits.hits.0.sort:
    - 18
    - 42
- do:
    search:
      rest_total_hits_as_int: true
      index: "test"
      body:
        size: 1
        query:
          match:
            foo: "bar"
        sort:
        - age: "desc"
        - id: "desc"
        search_after:
        - 18
        - 42
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._id: "1"
- match:
    hits.hits.0.sort:
    - 18
    - 1
- do:
    search:
      rest_total_hits_as_int: true
      index: "test"
      body:
        size: 1
        query:
          match:
            foo: "bar"
        sort:
        - age: "desc"
        - id: "desc"
        search_after:
        - 18
        - 1
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total: 3
- length:
    hits.hits: 0
---
date:
- do:
    indices.create:
      index: "test"
      body:
        mappings:
          properties:
            timestamp:
              type: "date"
              format: "yyyy-MM-dd HH:mm:ss.SSS"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    bulk:
      refresh: true
      index: "test"
      body: "{\"index\":{}}\n{\"timestamp\":\"2019-10-21 00:30:04.828\"}\n{\"index\"\
        :{}}\n{\"timestamp\":\"2019-10-21 08:30:04.828\"}\n"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 08:30:04.828"
- match:
    hits.hits.0.sort:
    - 1571646604828
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
        search_after:
        - 1571646604828
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 00:30:04.828"
- match:
    hits.hits.0.sort:
    - 1571617804828
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
        search_after:
        - "2019-10-21 08:30:04.828"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 00:30:04.828"
- match:
    hits.hits.0.sort:
    - 1571617804828
---
date_nanos:
- requires:
    cluster_features:
    - "gte_v7.10.0"
    reason: "fixed in 7.10.0"
- do:
    indices.create:
      index: "test"
      body:
        mappings:
          properties:
            timestamp:
              type: "date_nanos"
              format: "yyyy-MM-dd HH:mm:ss.SSSSSS"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    bulk:
      refresh: true
      index: "test"
      body: "{\"index\":{}}\n{\"timestamp\":\"2019-10-21 00:30:04.828740\"}\n{\"index\"\
        :{}}\n{\"timestamp\":\"2019-10-21 08:30:04.828733\"}\n"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 08:30:04.828733"
- match:
    hits.hits.0.sort:
    - 1571646604828733000
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
        search_after:
        - 1571646604828733000
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 00:30:04.828740"
- match:
    hits.hits.0.sort:
    - 1571617804828740000
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp: "desc"
        search_after:
        - "2019-10-21 08:30:04.828733"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 2
- length:
    hits.hits: 1
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2019-10-21 00:30:04.828740"
- match:
    hits.hits.0.sort:
    - 1571617804828740000
---
Format sort values:
- requires:
    cluster_features:
    - "gte_v7.13.0"
    reason: "Format sort output is introduced in 7.13"
- do:
    indices.create:
      index: "test"
      body:
        mappings:
          properties:
            timestamp:
              type: "date"
              format: "yyyy-MM-dd HH:mm:ss.SSS"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    indices.create:
      index: "test_nanos"
      body:
        mappings:
          properties:
            timestamp:
              type: "date_nanos"
              format: "dd/MM/yyyy HH:mm:ss.SSS"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    bulk:
      refresh: true
      index: "test"
      body: "{\"index\":{}}\n{\"timestamp\":\"2021-10-13 00:30:04.828\"}\n{\"index\"\
        :{}}\n{\"timestamp\":\"2021-06-11 04:30:04.828\"}\n{\"index\":{}}\n{\"timestamp\"\
        :\"2021-02-11 08:30:04.828\"}\n"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    bulk:
      refresh: true
      index: "test_nanos"
      body: "{\"index\":{}}\n{\"timestamp\":\"21/08/2021 03:30:04.732\"}\n{\"index\"\
        :{}}\n{\"timestamp\":\"20/05/2021 05:30:04.832\"}\n{\"index\":{}}\n{\"timestamp\"\
        :\"15/04/2021 06:30:04.821\"}\n"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp:
            order: "asc"
            format: "strict_date_optional_time_nanos"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._source.timestamp: "2021-02-11 08:30:04.828"
- match:
    hits.hits.0.sort:
    - "2021-02-11T08:30:04.828Z"
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp:
            order: "asc"
            format: "strict_date_optional_time_nanos"
        search_after:
        - "2021-02-11T08:30:04.828Z"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._source.timestamp: "2021-06-11 04:30:04.828"
- match:
    hits.hits.0.sort:
    - "2021-06-11T04:30:04.828Z"
- do:
    catch: "/failed to parse date field/"
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp:
            order: "asc"
            format: "yyyy-MM-dd HH:mm:ss.SSS"
        search_after:
        - "2021-02-11T08:30:04.828Z"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    catch: "/failed to parse date field/"
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp:
            order: "asc"
            format: "epoch_millis"
        search_after:
        - "2021-02-11T08:30:04.828Z"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- do:
    search:
      index: "test"
      body:
        size: 1
        sort:
        - timestamp:
            order: "asc"
            format: "yyyy-MM-dd | HH:mm:ss.SSS"
        search_after:
        - "2021-02-11 | 08:30:04.828"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 3
- length:
    hits.hits: 1
- match:
    hits.hits.0._source.timestamp: "2021-06-11 04:30:04.828"
- match:
    hits.hits.0.sort:
    - "2021-06-11 | 04:30:04.828"
- do:
    search:
      index: "tes*"
      body:
        size: 2
        sort:
        - timestamp:
            order: "asc"
            format: "strict_date_optional_time_nanos"
            numeric_type: "date_nanos"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 6
- length:
    hits.hits: 2
- match:
    hits.hits.0._index: "test"
- match:
    hits.hits.0._source.timestamp: "2021-02-11 08:30:04.828"
- match:
    hits.hits.0.sort:
    - "2021-02-11T08:30:04.828Z"
- match:
    hits.hits.1._index: "test_nanos"
- match:
    hits.hits.1._source.timestamp: "15/04/2021 06:30:04.821"
- match:
    hits.hits.1.sort:
    - "2021-04-15T06:30:04.821Z"
- do:
    search:
      index: "test*"
      body:
        size: 2
        sort:
        - timestamp:
            order: "asc"
            format: "strict_date_optional_time_nanos"
            numeric_type: "date"
        search_after:
        - "2021-04-15T06:30:04.821Z"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- match:
    hits.total.value: 6
- length:
    hits.hits: 2
- match:
    hits.hits.0._index: "test_nanos"
- match:
    hits.hits.0._source.timestamp: "20/05/2021 05:30:04.832"
- match:
    hits.hits.0.sort:
    - "2021-05-20T05:30:04.832Z"
- match:
    hits.hits.1._index: "test"
- match:
    hits.hits.1._source.timestamp: "2021-06-11 04:30:04.828"
- match:
    hits.hits.1.sort:
    - "2021-06-11T04:30:04.828Z"
