AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
---
"cluster health basic test":
- requires:
capabilities:
- method: GET
path: /_cluster/health
capabilities: [ unassigned_pri_shard_count ]
test_runner_features: capabilities
reason: Capability required to run test
- do:
cluster.health: {}
- is_true: cluster_name
- is_false: timed_out
- gte: { number_of_nodes: 1 }
- gte: { number_of_data_nodes: 1 }
- match: { active_primary_shards: 0 }
- match: { active_shards: 0 }
- match: { relocating_shards: 0 }
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- match: { unassigned_primary_shards: 0 }
- gte: { number_of_pending_tasks: 0 }
---
"cluster health basic test, one index":
- requires:
capabilities:
- method: GET
path: /_cluster/health
capabilities: [ unassigned_pri_shard_count ]
test_runner_features: capabilities
reason: Capability required to run test
- do:
indices.create:
index: test_index
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: green
wait_for_no_relocating_shards: true
- is_true: cluster_name
- is_false: timed_out
- gte: { number_of_nodes: 1 }
- gte: { number_of_data_nodes: 1 }
- gt: { active_primary_shards: 0 }
- gt: { active_shards: 0 }
- gte: { relocating_shards: 0 }
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- match: { unassigned_primary_shards: 0 }
- gte: { number_of_pending_tasks: 0 }
---
"cluster health basic test, one index with wait for active shards":
- requires:
capabilities:
- method: GET
path: /_cluster/health
capabilities: [ unassigned_pri_shard_count ]
test_runner_features: capabilities
reason: Capability required to run test
- do:
indices.create:
index: test_index
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_active_shards: 1
wait_for_no_relocating_shards: true
- is_true: cluster_name
- is_false: timed_out
- gte: { number_of_nodes: 1 }
- gte: { number_of_data_nodes: 1 }
- gt: { active_primary_shards: 0 }
- gt: { active_shards: 0 }
- gte: { relocating_shards: 0 }
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- match: { unassigned_primary_shards: 0 }
- gte: { number_of_pending_tasks: 0 }
---
"cluster health basic test, one index with wait for all active shards":
- requires:
capabilities:
- method: GET
path: /_cluster/health
capabilities: [ unassigned_pri_shard_count ]
test_runner_features: capabilities
reason: Capability required to run test
- do:
indices.create:
index: test_index
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_active_shards: all
wait_for_no_relocating_shards: true
- is_true: cluster_name
- is_false: timed_out
- gte: { number_of_nodes: 1 }
- gte: { number_of_data_nodes: 1 }
- gt: { active_primary_shards: 0 }
- gt: { active_shards: 0 }
- gte: { relocating_shards: 0 }
- match: { initializing_shards: 0 }
- match: { unassigned_shards: 0 }
- match: { unassigned_primary_shards: 0 }
- gte: { number_of_pending_tasks: 0 }
---
"cluster health basic test, one index with wait for no initializing shards":
- do:
indices.create:
index: test_index
wait_for_active_shards: 0
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_no_initializing_shards: true
- match: { initializing_shards: 0 }
---
"cluster health levels":
- do:
indices.create:
index: test_index
- do:
cluster.health:
level: indices
- is_true: indices
- is_false: indices.test_index.shards
- do:
cluster.health:
level: shards
- is_true: indices
- is_true: indices.test_index.shards
---
"cluster health with closed index (pre 7.2.0)":
- skip:
cluster_features: ["gte_v7.2.0"]
reason: "closed indices are replicated starting version 7.2.0"
- requires:
test_runner_features: ["allowed_warnings"]
- do:
indices.create:
index: index-1
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: green
- match: { status: green }
- do:
indices.create:
index: index-2
body:
settings:
index:
number_of_replicas: 50
- do:
cluster.health:
wait_for_status: yellow
wait_for_no_relocating_shards: true
- match: { status: yellow }
- do:
cluster.health:
index: index-*
- match: { status: yellow }
- do:
cluster.health:
index: index-1
- match: { status: green }
- do:
cluster.health:
index: index-2
- match: { status: yellow }
- do:
indices.close:
index: index-2
- is_true: acknowledged
# closing the index-2 turns the cluster health back to green
- do:
cluster.health:
wait_for_status: green
- match: { status: green }
- do:
cluster.health:
index: index-*
- match: { status: green }
- do:
cluster.health:
index: index-1
- match: { status: green }
- do:
cluster.health:
index: index-2
- match: { status: green }
---
"cluster health with closed index":
- requires:
cluster_features: ["gte_v7.2.0"]
reason: "closed indices are replicated starting version 7.2.0"
test_runner_features: ["allowed_warnings", "default_shards"]
- do:
indices.create:
index: index-1
body:
settings:
index:
number_of_replicas: 0
- do:
cluster.health:
wait_for_status: green
- match: { status: green }
- do:
indices.create:
index: index-2
body:
settings:
index:
number_of_replicas: 50
- do:
cluster.health:
wait_for_status: yellow
wait_for_no_relocating_shards: true
- match: { status: yellow }
- do:
cluster.health:
index: index-*
- match: { status: yellow }
- do:
cluster.health:
index: index-1
- match: { status: green }
- do:
cluster.health:
index: index-2
- match: { status: yellow }
# closing the index-2 does not change the cluster health with replicated closed indices
- do:
indices.close:
index: index-2
- is_true: acknowledged
- do:
cluster.health:
wait_for_status: yellow
- match: { status: yellow }
- do:
cluster.health:
index: index-*
- match: { status: yellow }
- do:
cluster.health:
index: index-1
- match: { status: green }
- do:
cluster.health:
index: index-2
- match: { status: yellow }