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.4 KB
Raw Blame
setup:
  - do:
     bulk:
        refresh: true
        index: test
        body:
          - '{"index": {}}'
          - '{"name": "one"}'
          - '{"index": {}}'
          - '{"name": "two"}'
          - '{"index": {}}'
          - '{"name": "two"}'

---
simple:
  - do:
      search:
        index: test
        body:
          size: 0
          query:
            match:
              name: two
          aggs:
            g:
              global: {}
              aggs:
                t:
                  terms:
                    field: name.keyword

  - match: { aggregations.g.doc_count: 3 }
  - length: { aggregations.g.t.buckets: 2 }
  - match: { aggregations.g.t.buckets.0.key: two }
  - match: { aggregations.g.t.buckets.1.key: one }

---
profile:
  - requires:
      cluster_features: ["gte_v7.13.0"]
      reason: fix introduced in 7.13.0

  - do:
      search:
        index: test
        body:
          profile: true
          size: 0
          query:
            match:
              name: two
          aggs:
            g:
              global: {}
              aggs:
                t:
                  terms:
                    field: name.keyword

  - match: { aggregations.g.doc_count: 3 }
  - length: { aggregations.g.t.buckets: 2 }
  - match: { aggregations.g.t.buckets.0.key: two }
  - match: { aggregations.g.t.buckets.1.key: one }
  - match: { profile.shards.0.aggregations.0.description: g }