Skip to content

armgit / xerj

Public Imported from GitHub
0

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.

1.2 KB
Raw Blame
setup:
  - do:
      indices.create:
          index: highlight_patterns
          body:
              mappings:
                  properties:
                      message:
                          type: text
                      title:
                          type: text
  - do:
      bulk:
          refresh: true
          body:
              - '{"index": {"_index": "highlight_patterns", "_id": "1"}}'
              - '{"message": "upstream timeout contacting backend", "title": "timeout report"}'

---
"highlight field patterns are expanded against the mapping (#1281)":
  - do:
      search:
          index: highlight_patterns
          body:
              query: { match: { message: timeout } }
              highlight: { fields: { "*": {} } }

  - match: { hits.hits.0.highlight.message.0: "upstream <em>timeout</em> contacting backend" }
  - is_false: hits.hits.0.highlight.title

  - do:
      search:
          index: highlight_patterns
          body:
              query: { match: { message: timeout } }
              highlight: { require_field_match: false, fields: { "t*": {} } }

  - match: { hits.hits.0.highlight.title.0: "<em>timeout</em> report" }
  - is_false: hits.hits.0.highlight.message