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
---
"Terms Query with No.of terms exceeding index.max_terms_count should FAIL":
- do:
indices.create:
index: test_index
body:
settings:
number_of_shards: 1
index.max_terms_count: 2
mappings:
properties:
user:
type: keyword
followers:
type: keyword
- do:
bulk:
refresh: true
body:
- '{"index": {"_index": "test_index", "_id": "u1"}}'
- '{"user": "u1", "followers": ["u2", "u3"]}'
- '{"index": {"_index": "test_index", "_id": "u2"}}'
- '{"user": "u2", "followers": ["u1", "u3", "u4"]}'
- '{"index": {"_index": "test_index", "_id": "u3"}}'
- '{"user": "u3", "followers": ["u1"]}'
- '{"index": {"_index": "test_index", "_id": "u4"}}'
- '{"user": "u4", "followers": ["u3"]}'
- do:
search:
rest_total_hits_as_int: true
index: test_index
body: {"query" : {"terms" : {"user" : ["u1", "u2"]}}}
- match: { hits.total: 2 }
- do:
catch: bad_request
search:
rest_total_hits_as_int: true
index: test_index
body: {"query" : {"terms" : {"user" : ["u1", "u2", "u3"]}}}
- do:
search:
rest_total_hits_as_int: true
index: test_index
body: {"query" : {"terms" : {"user" : {"index" : "test_index", "id" : "u1", "path" : "followers"}}}}
- match: { hits.total: 2 }
- do:
catch: bad_request
search:
rest_total_hits_as_int: true
index: test_index
body: {"query" : {"terms" : {"user" : {"index" : "test_index", "id" : "u2", "path" : "followers"}}}}