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_index1
- do:
indices.create:
index: test_index2
- do:
indices.create:
index: foo
---
"put one mapping per index":
- do:
indices.put_mapping:
index: test_index1
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.put_mapping:
index: test_index2
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}
- match: {test_index1.mappings.properties.text.analyzer: whitespace}
- match: {test_index2.mappings.properties.text.type: text}
- match: {test_index2.mappings.properties.text.analyzer: whitespace}
- match: { foo.mappings: {} }
---
"put mapping in _all index":
- do:
indices.put_mapping:
index: _all
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}
- match: {test_index1.mappings.properties.text.analyzer: whitespace}
- match: {test_index2.mappings.properties.text.type: text}
- match: {test_index2.mappings.properties.text.analyzer: whitespace}
- match: {foo.mappings.properties.text.type: text}
- match: {foo.mappings.properties.text.analyzer: whitespace}
---
"put mapping in * index":
- do:
indices.put_mapping:
index: "*"
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}
- match: {test_index1.mappings.properties.text.analyzer: whitespace}
- match: {test_index2.mappings.properties.text.type: text}
- match: {test_index2.mappings.properties.text.analyzer: whitespace}
- match: {foo.mappings.properties.text.type: text}
- match: {foo.mappings.properties.text.analyzer: whitespace}
---
"put mapping in prefix* index":
- do:
indices.put_mapping:
index: "test_index*"
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}
- match: {test_index1.mappings.properties.text.analyzer: whitespace}
- match: {test_index2.mappings.properties.text.type: text}
- match: {test_index2.mappings.properties.text.analyzer: whitespace}
- match: { foo.mappings: {} }
---
"put mapping in list of indices":
- do:
indices.put_mapping:
index: [test_index1, test_index2]
body:
properties:
text:
type: text
analyzer: whitespace
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}
- match: {test_index1.mappings.properties.text.analyzer: whitespace}
- match: {test_index2.mappings.properties.text.type: text}
- match: {test_index2.mappings.properties.text.analyzer: whitespace}
- match: { foo.mappings: {} }
---
"post a mapping with default analyzer twice":
- do:
indices.put_mapping:
index: test_index1
body:
dynamic: false
properties:
text:
analyzer: default
type: text
- do:
indices.put_mapping:
index: test_index1
body:
dynamic: false
properties:
text:
analyzer: default
type: text
- do:
indices.get_mapping: {}
- match: {test_index1.mappings.properties.text.type: text}