telys_search_lexical
Perform exact-term keyword search using BM25 to find identifiers and rare tokens that semantic search may miss. Requires a lexical-enabled collection and pre-built lexical index.
Instructions
On-device BM25 lexical (keyword) search — exact-term matching for identifiers and rare tokens where semantic search is fuzzy. Sibling: use telys_search for embedding-ranked (vector) retrieval; this tool is the BM25 path, no embedding involved. Requires the collection to have been created with lexical=True AND telys_build_lexical to have run, otherwise the call fails. Required: collection, query. Optional: top_k (default 5), where (single-key equality filter), explain (default false; include per-hit score explanations). Fails when the collection does not exist or the lexical index was never built.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection": "<collection>",
"query": "<query>"
},
"name": "telys_search_lexical"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | keyword query for BM25 matching | |
| top_k | No | maximum hits to return, ordered best-first | |
| where | No | optional single-key equality filter, e.g. scope=project:acme (one key only) | |
| explain | No | include per-hit score explanations | |
| collection | Yes | name of an existing collection created with lexical=True |