diff --git a/src/snippet.rs b/src/snippet.rs index 7bfe281..f8de416 100644 --- a/src/snippet.rs +++ b/src/snippet.rs @@ -80,4 +80,8 @@ impl SnippetGenerator { let result = self.inner.snippet(&text); Snippet { inner: result } } + + pub fn set_max_num_chars(&mut self, max_num_chars: usize) { + self.inner.set_max_num_chars(max_num_chars); + } } diff --git a/tantivy/tantivy.pyi b/tantivy/tantivy.pyi index e77180f..0120c32 100644 --- a/tantivy/tantivy.pyi +++ b/tantivy/tantivy.pyi @@ -433,3 +433,6 @@ class SnippetGenerator: def snippet_from_doc(self, doc: Document) -> Snippet: pass + + def set_max_num_chars(self, max_num_chars: int) -> None: + pass \ No newline at end of file