feat: support prefix matching and must_not clause (#2441)

This commit is contained in:
BubbleCal
2025-06-19 10:32:32 +08:00
committed by GitHub
parent c72f6770fd
commit cbb5a841b1
6 changed files with 124 additions and 33 deletions

View File

@@ -335,6 +335,7 @@ impl JsFullTextQuery {
fuzziness: Option<u32>,
max_expansions: u32,
operator: String,
prefix_length: u32,
) -> napi::Result<Self> {
Ok(Self {
inner: MatchQuery::new(query)
@@ -347,6 +348,7 @@ impl JsFullTextQuery {
napi::Error::from_reason(format!("Invalid operator: {}", e))
})?,
)
.with_prefix_length(prefix_length)
.into(),
})
}