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.9 KB
Raw Blame
---
"binary":
    - requires:
        test_runner_features: ["headers"]
        cluster_features: ["gte_v8.0.0"]
        reason: "docvalues_fields on binary field were corrected in 8.0"
    - do:
        indices.create:
            index: test
            body:
                mappings:
                    properties:
                        binary:
                            type: binary
                            doc_values: true

    - do:
        #other formats (e.g. cbor) may not support parsing of binary
        headers:
            Content-Type: application/json
        index:
            index: test
            refresh: true
            id: "1"
            body:
                binary: U29tZSBiaW5hcnkgYmxvYg==

    - do:
        search:
            index: test
            body:
                docvalue_fields: [ "binary" ]
    - match: { hits.hits.0.fields.binary.0: "U29tZSBiaW5hcnkgYmxvYg==" }

    - do:
        search:
            index: test
            body:
                fields: [ "binary" ]
    - match: { hits.hits.0.fields.binary.0: "U29tZSBiaW5hcnkgYmxvYg==" }

    - do:
        search:
            index: test
            body:
                _source: ["binary"]
    - match: { hits.hits.0._source.binary: "U29tZSBiaW5hcnkgYmxvYg==" }

---
"binary synthetic source":
  - requires:
      cluster_features: [ "mapper.source.mode_from_index_setting" ]
      reason: "Source mode configured through index setting"

  - do:
      indices.create:
        index: test
        body:
          settings:
            index:
              mapping.source.mode: synthetic
          mappings:
            properties:
              binary:
                type: binary
                doc_values: true

  - do:
      index:
        index: test
        refresh: true
        id: "1"
        body:
          binary: U29tZSBiaW5hcnkgYmxvYg==

  - do:
      search:
        index: test
  - match: { hits.hits.0._source.binary: "U29tZSBiaW5hcnkgYmxvYg==" }