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.0 KB
Raw Blame
---
"Empty Bucket Aggregation":
  - do:
      indices.create:
        index: empty_bucket_idx
        body:
          settings:
            number_of_shards: "3"
          mappings:
            "properties":
              "value":
                "type": "integer"
              "val1":
                "type": "double"

  - do:
      index:
        index:  empty_bucket_idx
        id:     "1"
        body:   { "value": 0, "val1": 3.1 }

  - do:
      index:
        index:  empty_bucket_idx
        id:     "2"
        body:   { "value": 2, "val1": -3.1 }

  - do:
      indices.refresh:
        index: [empty_bucket_idx]

  - do:
      search:
        rest_total_hits_as_int: true
        index: empty_bucket_idx

  - match: {hits.total: 2}

  - do:
      search:
        rest_total_hits_as_int: true
        index: empty_bucket_idx
        body: {"aggs": {"histo": {"histogram": {"field": "val1", "interval": 1, "min_doc_count": 0}, "aggs": { "mfs" : { "matrix_stats": {"fields": ["value", "val1"]} } } } } }

  - match: {hits.total: 2}