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
setup:
- do:
indices.create:
index: test_1
- do:
index:
index: test_1
id: "1"
body: { foo: foo }
## we index again in order to make the seq# 1 (so we can check for the field existence with is_false)
- do:
index:
index: test_1
id: "1"
body: { foo: bar }
- do:
indices.refresh:
index: [test_1]
---
"sequence numbers are returned if requested from body":
- do:
search:
index: _all
body:
query:
match:
foo: bar
seq_no_primary_term: true
- match: {hits.hits.0._seq_no: 1}
- gte: {hits.hits.0._primary_term: 1}
---
"sequence numbers are returned if requested from url":
- do:
search:
index: _all
body:
query:
match:
foo: bar
seq_no_primary_term: true
- match: {hits.hits.0._seq_no: 1}
- gte: {hits.hits.0._primary_term: 1}
---
"sequence numbers are not returned if not requested":
- do:
search:
index: _all
body:
query:
match:
foo: bar
- is_false: hits.hits.0._seq_no
- is_false: hits.hits.0._primary_term