diff --git a/src/search/fts.rs b/src/search/fts.rs index 9ac0916..34159a5 100644 --- a/src/search/fts.rs +++ b/src/search/fts.rs @@ -54,7 +54,9 @@ pub fn to_fts_query(raw: &str, mode: FtsQueryMode) -> String { // FTS5 boolean operators are case-sensitive uppercase keywords. // Pass them through unquoted so users can write "switch AND health". - const FTS5_OPERATORS: &[&str] = &["AND", "OR", "NOT", "NEAR"]; + // Note: NEAR is a function NEAR(term1 term2, N), not an infix operator. + // Users who need NEAR syntax should use FtsQueryMode::Raw. + const FTS5_OPERATORS: &[&str] = &["AND", "OR", "NOT"]; let mut result = String::with_capacity(trimmed.len() + 20); for (i, token) in trimmed.split_whitespace().enumerate() {