---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
cluster stats test:
- do:
    cluster.stats: {}
    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_true: "timestamp"
- is_true: "cluster_name"
- match:
    status: "green"
- gte:
    indices.count: 0
- is_true: "indices.docs"
- is_true: "indices.store"
- is_true: "indices.fielddata"
- is_true: "indices.query_cache"
- is_true: "indices.completion"
- is_true: "indices.segments"
- gte:
    nodes.count.total: 1
- gte:
    nodes.count.master: 1
- gte:
    nodes.count.data: 1
- gte:
    nodes.count.ingest: 0
- gte:
    nodes.count.coordinating_only: 0
- is_true: "nodes.os"
- is_true: "nodes.os.mem.total_in_bytes"
- is_true: "nodes.os.mem.free_in_bytes"
- is_true: "nodes.os.mem.used_in_bytes"
- gte:
    nodes.os.mem.free_percent: 0
- gte:
    nodes.os.mem.used_percent: 0
- is_true: "nodes.process"
- is_true: "nodes.jvm"
- is_true: "nodes.fs"
- is_true: "nodes.plugins"
- is_true: "nodes.network_types"
---
cluster stats accepts timeout param:
- do:
    cluster.stats:
      timeout: "24h"
    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_true: "timestamp"
- is_true: "cluster_name"
---
cluster stats with human flag returns docs as human readable size:
- requires:
    test_runner_features:
    - "capabilities"
    capabilities:
    - method: "GET"
      path: "/_cluster/stats"
      capabilities:
      - "human-readable-total-docs-size"
    reason: "Capability required to run test"
- do:
    index:
      index: "test"
      id: "1"
      refresh: true
      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:
    cluster.stats:
      human: true
    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"
- exists: "indices.docs.total_size_in_bytes"
- exists: "indices.docs.total_size"
---
get cluster stats returns cluster_uuid at the top level:
- do:
    cluster.stats: {}
    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_true: "cluster_uuid"
- is_true: "timestamp"
- is_true: "cluster_name"
- match:
    status: "green"
- gte:
    indices.count: 0
- is_true: "indices.docs"
- is_true: "indices.store"
- is_true: "indices.fielddata"
- is_true: "indices.query_cache"
- is_true: "indices.completion"
- is_true: "indices.segments"
- gte:
    nodes.count.total: 1
- gte:
    nodes.count.master: 1
- gte:
    nodes.count.data: 1
- gte:
    nodes.count.ingest: 0
- gte:
    nodes.count.coordinating_only: 0
- is_true: "nodes.os"
- is_true: "nodes.os.mem.total_in_bytes"
- is_true: "nodes.os.mem.free_in_bytes"
- is_true: "nodes.os.mem.used_in_bytes"
- gte:
    nodes.os.mem.free_percent: 0
- gte:
    nodes.os.mem.used_percent: 0
- is_true: "nodes.process"
- is_true: "nodes.jvm"
- is_true: "nodes.fs"
- is_true: "nodes.plugins"
- is_true: "nodes.network_types"
---
get cluster stats returns discovery types:
- do:
    cluster.stats: {}
    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_true: "nodes.discovery_types"
---
get cluster stats returns packaging types:
- requires:
    cluster_features:
    - "gte_v7.2.0"
    reason: "packaging types are added for v7.2.0"
- do:
    cluster.stats: {}
    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_true: "nodes.packaging_types"
---
get cluster stats without runtime fields:
- requires:
    cluster_features:
    - "gte_v7.13.0"
    reason: "cluster stats includes runtime fields from 7.13 on"
- do:
    indices.create:
      index: "sensor"
    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:
    cluster.stats: {}
    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"
- length:
    indices.mappings.field_types: 0
- length:
    indices.mappings.runtime_field_types: 0
---
Usage stats with script-less runtime fields:
- requires:
    cluster_features:
    - "gte_v7.13.0"
    reason: "cluster stats includes runtime fields from 7.13 on"
- do:
    indices.create:
      index: "sensor"
      body:
        mappings:
          runtime:
            message_from_source:
              type: "keyword"
            bad_map:
              type: "double"
            message.text:
              type: "keyword"
          properties:
            message:
              type: "keyword"
              fields:
                text:
                  type: "text"
            bad_map:
              type: "long"
    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:
    cluster.stats: {}
    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"
- length:
    indices.mappings.field_types: 3
- match:
    indices.mappings.field_types.0.name: "keyword"
- match:
    indices.mappings.field_types.0.count: 1
- match:
    indices.mappings.field_types.0.index_count: 1
- match:
    indices.mappings.field_types.1.name: "long"
- match:
    indices.mappings.field_types.1.count: 1
- match:
    indices.mappings.field_types.1.index_count: 1
- match:
    indices.mappings.field_types.2.name: "text"
- match:
    indices.mappings.field_types.2.count: 1
- match:
    indices.mappings.field_types.2.index_count: 1
- length:
    indices.mappings.runtime_field_types: 2
- match:
    indices.mappings.runtime_field_types.0.name: "double"
- match:
    indices.mappings.runtime_field_types.0.count: 1
- match:
    indices.mappings.runtime_field_types.0.index_count: 1
- match:
    indices.mappings.runtime_field_types.0.scriptless_count: 1
- match:
    indices.mappings.runtime_field_types.0.shadowed_count: 1
- match:
    indices.mappings.runtime_field_types.0.source_max: 0
- match:
    indices.mappings.runtime_field_types.0.source_total: 0
- match:
    indices.mappings.runtime_field_types.0.lines_max: 0
- match:
    indices.mappings.runtime_field_types.0.lines_total: 0
- match:
    indices.mappings.runtime_field_types.0.chars_max: 0
- match:
    indices.mappings.runtime_field_types.0.chars_total: 0
- match:
    indices.mappings.runtime_field_types.0.doc_max: 0
- match:
    indices.mappings.runtime_field_types.0.doc_total: 0
- match:
    indices.mappings.runtime_field_types.1.name: "keyword"
- match:
    indices.mappings.runtime_field_types.1.count: 2
- match:
    indices.mappings.runtime_field_types.1.index_count: 1
- match:
    indices.mappings.runtime_field_types.1.scriptless_count: 2
- match:
    indices.mappings.runtime_field_types.1.shadowed_count: 1
- match:
    indices.mappings.runtime_field_types.1.source_max: 0
- match:
    indices.mappings.runtime_field_types.1.source_total: 0
- match:
    indices.mappings.runtime_field_types.1.lines_max: 0
- match:
    indices.mappings.runtime_field_types.1.lines_total: 0
- match:
    indices.mappings.runtime_field_types.1.chars_max: 0
- match:
    indices.mappings.runtime_field_types.1.chars_total: 0
- match:
    indices.mappings.runtime_field_types.1.doc_max: 0
- match:
    indices.mappings.runtime_field_types.1.doc_total: 0
---
mappings sizes reported in get cluster stats:
- requires:
    cluster_features:
    - "gte_v8.4.0"
    reason: "mapping sizes reported from 8.4 onwards"
- do:
    indices.create:
      index: "sensor"
      body:
        mappings:
          properties:
            field:
              type: "keyword"
    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:
    cluster.stats: {}
    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"
- gt:
    indices.mappings.total_field_count: 0
- gt:
    indices.mappings.total_deduplicated_field_count: 0
- gt:
    indices.mappings.total_deduplicated_mapping_size_in_bytes: 0
---
snapshot stats reported in get cluster stats:
- requires:
    cluster_features:
    - "gte_v8.8.0"
    reason: "snapshot stats reported from 8.8 onwards"
- do:
    snapshot.create_repository:
      repository: "test_repo_for_stats"
      body:
        type: "fs"
        settings:
          location: "test_repo_for_stats_loc"
    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:
    cluster.stats:
      human: true
    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"
- gte:
    snapshots.current_counts.snapshots: 0
- gte:
    snapshots.current_counts.shard_snapshots: 0
- gte:
    snapshots.current_counts.snapshot_deletions: 0
- gte:
    snapshots.current_counts.concurrent_operations: 0
- gte:
    snapshots.current_counts.cleanups: 0
- is_true: "snapshots.repositories.test_repo_for_stats.type"
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.snapshots: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.clones: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.finalizations: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.deletions: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.snapshot_deletions: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.active_deletions: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.total: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.complete: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.incomplete: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.INIT: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.SUCCESS: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.FAILED: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.ABORTED: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.MISSING: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.WAITING: 0
- gte:
    snapshots.repositories.test_repo_for_stats.current_counts.shards.states.QUEUED: 0
- gte:
    snapshots.repositories.test_repo_for_stats.oldest_start_time_millis: 0
- is_true: "snapshots.repositories.test_repo_for_stats.oldest_start_time"
---
Dense vector stats:
- requires:
    cluster_features:
    - "gte_v8.16.0"
    reason: "dense vector stats reports from primary indices in 8.15 and fixed in\
      \ 8.16"
- do:
    indices.create:
      index: "test1"
      body:
        mappings:
          properties:
            vector:
              type: "dense_vector"
              index: true
              dims: 3
              similarity: "cosine"
            another_vector:
              type: "dense_vector"
              index: true
              dims: 3
              similarity: "cosine"
    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: "test2"
      body:
        mappings:
          properties:
            vector:
              type: "dense_vector"
              index: true
              dims: 3
              similarity: "cosine"
            another_vector:
              type: "dense_vector"
              index: true
              dims: 3
              similarity: "cosine"
    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: "test1"
      id: "1"
      body:
        vector:
        - 1
        - 2
        - 3
        another_vector:
        - 4
        - 5
        - 6
    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: "test1"
      id: "2"
      body:
        vector:
        - 7
        - 8
        - 9
        another_vector:
        - 10
        - 11
        - 12
    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: "test2"
      id: "1"
      body:
        vector:
        - 1
        - 2
        - 3
        another_vector:
        - 4
        - 5
        - 6
    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: "test2"
      id: "2"
      body:
        vector:
        - 7
        - 8
        - 9
        another_vector:
        - 10
        - 11
        - 12
    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: {}
    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: "test2"
      id: "3"
      refresh: true
      body:
        not_vector_field: "not vector"
    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:
    cluster.stats: {}
    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:
    indices.docs.count: 5
- match:
    indices.docs.deleted: 0
- match:
    indices.dense_vector.value_count: 8
---
Sparse vector stats:
- requires:
    cluster_features:
    - "gte_v8.15.0"
    reason: "sparse vector stats added in 8.15"
- do:
    indices.create:
      index: "test1"
      body:
        settings:
          number_of_replicas: 0
        mappings:
          properties:
            vector:
              type: "sparse_vector"
            another_vector:
              type: "sparse_vector"
            not_a_vector:
              type: "keyword"
    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: "test2"
      body:
        settings:
          number_of_replicas: 0
        mappings:
          properties:
            vector:
              type: "sparse_vector"
            another_vector:
              type: "sparse_vector"
    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: "test1"
      id: "1"
      body:
        vector:
          a: 1.0
          b: 2.0
          c: 3.0
        another_vector:
          d: 4.0
          e: 5.0
          f: 6.0
        not_a_vector: "I'm not a vector"
    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: "test1"
      id: "2"
      body:
        vector:
          g: 7.0
          h: 8.0
          i: 9.0
        another_vector:
          j: 10.0
          k: 11.0
          l: 12.0
    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: "test1"
      id: "3"
      body:
        not_a_vector: "seriously, I'm not a vector"
    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: "test2"
      id: "1"
      body:
        vector:
          a: 1.0
          b: 2.0
          c: 3.0
        another_vector:
          d: 4.0
          e: 5.0
          f: 6.0
    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: "test2"
      id: "2"
      body:
        vector:
          g: 7.0
          h: 8.0
          i: 9.0
    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: {}
    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:
    cluster.stats: {}
    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:
    indices.docs.count: 5
- match:
    indices.docs.deleted: 0
- match:
    indices.sparse_vector.value_count: 7
