Reference Entry
Phrase Search and Slop
Lexical Querying · querying · order 30
Match analyzed terms in sequence, with optional movement tolerance.
Relevant APIs
Phrase Search and Slop
MatchPhrase checks whether analyzed terms occur in order.
Exact phrase
import { MatchPhrase } from "@tryformation/querylight-ts";
const exact = new MatchPhrase("body", "vector search");
Phrase with slop
Slop allows nearby terms to count even when there is a little distance between them.
const tolerant = new MatchPhrase("body", "portable json index state", 2, 2.0);
Good queries to try in the demo
"portable json index state""vector search""phrase search"