Struct tantivy::Document [−][src]
pub struct Document { /* fields omitted */ }
Expand description
Tantivy’s Document is the object that can be indexed and then searched for.
Documents are fundamentally a collection of unordered couple (field, value)
.
In this list, one field may appear more than once.
Documents are really just a list of couple (field, value)
.
In this list, one field may appear more than once.
Implementations
Retain only the field that are matching the predicate given in argument.
Adding a facet to the document.
pub fn add_pre_tokenized_text(
&mut self,
field: Field,
pre_tokenized_text: &PreTokenizedString
)
pub fn add_pre_tokenized_text(
&mut self,
field: Field,
pre_tokenized_text: &PreTokenizedString
)
Add a pre-tokenized text field.
Add a field value
field_values accessor
Sort and groups the field_values by field.
The result of this method is not cached and is computed on the fly when this method is called.
Returns all of the FieldValue
s associated the given field
Returns the first FieldValue
associated the given field
Prepares Document for being stored in the document store
Method transforms PreTokenizedString values into String values.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Document
impl UnwindSafe for Document
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more