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.

fix: doc-comment split by geo_coord insertion tripped clippy::doc_lazy_continuation

Vincenzo Lombardoee33a51028d8
diff --git a/engine/crates/xerj-engine/src/aggs.rs b/engine/crates/xerj-engine/src/aggs.rs
index 245d21b73..cc6207660 100644
--- a/engine/crates/xerj-engine/src/aggs.rs
+++ b/engine/crates/xerj-engine/src/aggs.rs
@@ -8564,13 +8564,6 @@ fn encode_geohash(lat: f64, lon: f64, precision: usize) -> String {
String::from_utf8(hash).unwrap_or_default()
}
-/// Extract a (lat, lon) pair from an ES geo_point value.
-/// Accepts:
-/// - {"lat": 1.0, "lon": 2.0}
-/// - [lon, lat] (GeoJSON)
-/// - "POINT (lon lat)"
-/// - "lat,lon"
-/// - GeoHash string (not parsed — returns None)
/// Coerce a `lat`/`lon` object member to `f64`. Real ES accepts numeric
/// OR string-encoded lat/lon inside a `{"lat": .., "lon": ..}` geo_point
/// object (normalised to numbers at index time) — Kibana's own flights
@@ -8582,6 +8575,13 @@ fn geo_coord(v: &Value) -> Option<f64> {
.or_else(|| v.as_str().and_then(|s| s.trim().parse().ok()))
}
+/// Extract a (lat, lon) pair from an ES geo_point value.
+/// Accepts:
+/// - {"lat": 1.0, "lon": 2.0}
+/// - [lon, lat] (GeoJSON)
+/// - "POINT (lon lat)"
+/// - "lat,lon"
+/// - GeoHash string (not parsed — returns None)
fn parse_geo_point(v: &Value) -> Option<(f64, f64)> {
match v {
Value::Object(o) => {
diff --git a/engine/crates/xerj-engine/src/index.rs b/engine/crates/xerj-engine/src/index.rs
index 65b077af5..539a5428c 100644
--- a/engine/crates/xerj-engine/src/index.rs
+++ b/engine/crates/xerj-engine/src/index.rs
@@ -20501,9 +20501,6 @@ fn postings_union_expand(
(count, positions)
}
-/// Evaluate a query against a single stored document source value.
-///
-/// Returns true if the document matches the query.
/// Coerce a `lat`/`lon` object member to `f64`. Real ES accepts numeric OR
/// string-encoded lat/lon inside a `{"lat": .., "lon": ..}` geo_point object
/// (normalised to numbers at index time) — Kibana's own flights sample data
@@ -20515,6 +20512,9 @@ fn geo_coord(v: &Value) -> Option<f64> {
.or_else(|| v.as_str().and_then(|s| s.trim().parse().ok()))
}
+/// Evaluate a query against a single stored document source value.
+///
+/// Returns true if the document matches the query.
fn doc_matches_query(q: &QueryNode, source: &Value) -> bool {
match q {
QueryNode::MatchAll => true,