pub struct FtSearchSummarizeOptions<'a> { /* private fields */ }Implementations§
Source§impl<'a> FtSearchSummarizeOptions<'a>
impl<'a> FtSearchSummarizeOptions<'a>
Sourcepub fn field(self, field: &'a str) -> Self
pub fn field(self, field: &'a str) -> Self
If present, must be the first argument.
Each field present is summarized.
If no FIELDS directive is passed, then all fields returned are summarized.
Call multiple times to add multiple fields
Sourcepub fn frags(self, num_frags: u32) -> Self
pub fn frags(self, num_frags: u32) -> Self
How many fragments should be returned. If not specified, a default of 3 is used.
Sourcepub fn len(self, frag_len: u32) -> Self
pub fn len(self, frag_len: u32) -> Self
The number of context words each fragment should contain.
Context words surround the found term. A higher value will return a larger block of text. If not specified, the default value is 20.
Sourcepub fn separator(self, separator: &'a str) -> Self
pub fn separator(self, separator: &'a str) -> Self
The string used to divide between individual summary snippets.
The default is ... which is common among search engines;
but you may override this with any other string if you desire to programmatically divide them later on.
You may use a newline sequence, as newlines are stripped from the result body anyway
(thus, it will not be conflated with an embedded newline in the text)