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
---
"search with query_string parameters":
- do:
indices.create:
index: test
body:
mappings:
properties:
number:
type: integer
- do:
index:
index: test
id: "1"
body: { field: foo bar}
- do:
indices.refresh:
index: [test]
- do:
search:
rest_total_hits_as_int: true
index: test
q: bar
df: field
- match: {hits.total: 1}
- do:
search:
rest_total_hits_as_int: true
index: test
q: field:foo field:xyz
- match: {hits.total: 1}
- do:
search:
rest_total_hits_as_int: true
index: test
q: field:foo field:xyz
default_operator: AND
- match: {hits.total: 0}
- do:
search:
rest_total_hits_as_int: true
index: test
q: field:BA*
- match: {hits.total: 1}
# Grouped sub-query: `field:(foo OR bar)` — parenthesized OR group.
# The doc `{field: "foo bar"}` matches on either term.
- do:
search:
rest_total_hits_as_int: true
index: test
q: field:(foo OR bar)
- match: {hits.total: 1}
# Grouped OR where only one arm matches still returns the doc.
- do:
search:
rest_total_hits_as_int: true
index: test
q: field:(foo OR xyz)
- match: {hits.total: 1}
- do:
search:
rest_total_hits_as_int: true
index: test
q: number:foo
lenient: true
- match: {hits.total: 0}