Struct tantivy::Document [] [src]

pub struct Document { /* fields omitted */ }

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.

Methods

impl Document
[src]

Creates a new, empty document object

Returns the number of (field, value) pairs.

Returns true iff the document contains no fields.

Add a text field.

Add a u64 field

Add a u64 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 FieldValues associated the given field

Returns the first FieldValue associated the given field

Trait Implementations

impl Debug for Document
[src]

Formats the value using the given formatter.

impl Default for Document
[src]

Returns the "default value" for a type. Read more

impl PartialEq for Document
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Document
[src]

impl From<Vec<FieldValue>> for Document
[src]

Performs the conversion.