/** * Escapes special Lucene characters in a query string. * * Symbol-form operators escaped: * + - && || ! ( ) { } [ ] ^ " ~ * ? : \ / * * Bareword booleans (`AND`, `OR`, `NOT`, `TO`) are also neutralised. Pre- * 1.7.3 they survived sanitisation, letting an attacker inject a boolean * query (e.g. `foo AND _exists_:adminFlag`) even after symbol escaping. * The standard Lucene analyser lowercases tokens during indexing, so * lowercasing the bareword turns it into a literal-word match — which * is what callers of `sanitizeLuceneQuery` expect (the function exists * to make untrusted user input safe to pass to Lucene). Range-modifier * boost/fuzzy (`^N`, `~N`) are already disarmed because `^` and `~` * get backslash-escaped in the symbol pass. */ export declare function sanitizeLuceneQuery(query: string): string; //# sourceMappingURL=lucene.d.ts.map