---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Default index/type:
- do:
    indices.create:
      index: "test_2"
    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_1"
      id: "1"
      body:
        foo: "bar"
    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:
    mget:
      index: "test_1"
      body:
        docs:
        - _index: "test_2"
          _id: "1"
        - _id: "2"
        - _id: "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"
- is_false: "docs.0.found"
- match:
    docs.0._index: "test_2"
- match:
    docs.0._id: "1"
- is_false: "docs.1.found"
- match:
    docs.1._index: "test_1"
- match:
    docs.1._id: "2"
- is_true: "docs.2.found"
- match:
    docs.2._index: "test_1"
- match:
    docs.2._id: "1"
- match:
    docs.2._version: 1
- match:
    docs.2._source:
      foo: "bar"
