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.

Merge origin/main into fix/config-dormant-overrides

xerj-org224be9dd7b94
diff --cc engine/crates/xerj-query/src/parser.rs
index e67d78040,5cd95daee..13ece23e3
--- a/engine/crates/xerj-query/src/parser.rs
+++ b/engine/crates/xerj-query/src/parser.rs
@@@ -2073,6 -2156,22 +2156,26 @@@ fn parse_qs_unary
return None;
}
match toks[*pos].clone() {
+ QsTok::FieldGroup(field) => {
+ // `field:( … )` (#1298): parse the group as if `field` were the
+ // only default field, so every unqualified clause inside it
+ // (terms, phrases, wildcards, ranges, nested groups) targets
+ // `field`. A clause inside that names its own field keeps it,
+ // as in ES. The tokenizer always emits `LParen` next.
+ *pos += 1;
+ if !matches!(toks.get(*pos), Some(QsTok::LParen)) {
+ return None;
+ }
+ let scoped = QsFields {
+ default_field: Some(&field),
+ fields: &[],
++ // Leniency is decided once per `query_string`, not per clause
++ // (#1284): the scoped field group inherits the enclosing
++ // context's flag so every leaf it lowers to is stamped alike.
++ lenient: ctx.lenient,
+ };
+ parse_qs_unary(toks, pos, scoped, default_op)
+ }
QsTok::LParen => {
*pos += 1;
// Bound paren-nesting depth. The shared thread-local `QUERY_DEPTH`