Enum tantivy::schema::FieldType [−][src]
pub enum FieldType { Str(TextOptions), U64(IntOptions), I64(IntOptions), F64(IntOptions), Date(IntOptions), HierarchicalFacet(FacetOptions), Bytes(BytesOptions), }
Expand description
A FieldType
describes the type (text, u64) of a field as well as
how it should be handled by tantivy.
Variants
Str(TextOptions)
String field type configuration
U64(IntOptions)
Unsigned 64-bits integers field type configuration
I64(IntOptions)
Signed 64-bits integers 64 field type configuration
F64(IntOptions)
64-bits float 64 field type configuration
Date(IntOptions)
Signed 64-bits Date 64 field type configuration,
HierarchicalFacet(FacetOptions)
Hierachical Facet
Bytes(BytesOptions)
Bytes (one per document)
Implementations
Returns the value type associated for this field.
returns true iff the field is indexed.
Given a field configuration, return the maximal possible
IndexRecordOption
available.
If the field is not indexed, then returns None
.
Parses a field value from json, given the target FieldType.
Tantivy will not try to cast values.
For instance, If the json value is the integer 3
and the
target field is a Str
, this method will return an Error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FieldType
impl UnwindSafe for FieldType
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
pub fn vzip(self) -> V