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.5 KB
Raw Blame
---
"Test Index and Search locale dependent mappings / dates":
  - requires:
      test_runner_features: ["allowed_warnings_regex"]
  - do:
      allowed_warnings_regex:
        - "Date format \\[E, d MMM yyyy HH:mm:ss Z] contains textual field specifiers that could change in JDK 23.*"
      indices.create:
          index: test_index
          body:
              settings:
                  number_of_shards: 1
              mappings:
                  properties:
                      date_field:
                          type: date
                          format: "E, d MMM yyyy HH:mm:ss Z"
                          locale: "fr"
  - do:
      bulk:
          refresh: true
          body:
              - '{"index": {"_index": "test_index", "_id": "1"}}'
              - '{"date_field": "mer., 6 déc. 2000 02:55:00 -0800"}'
              - '{"index": {"_index": "test_index", "_id": "2"}}'
              - '{"date_field": "jeu., 7 déc. 2000 02:55:00 -0800"}'

  - do:
      search:
          rest_total_hits_as_int: true
          index: test_index
          body: {"query" : {"range" : {"date_field" : {"gte": "mar., 5 déc. 2000 02:55:00 -0800", "lte": "jeu., 7 déc. 2000 00:00:00 -0800"}}}}
  - match: { hits.total: 1 }

  - do:
      search:
          rest_total_hits_as_int: true
          index: test_index
          body: {"query" : {"range" : {"date_field" : {"gte": "mar., 5 déc. 2000 02:55:00 -0800", "lte": "ven., 8 déc. 2000 00:00:00 -0800"}}}}
  - match: { hits.total: 2 }