Enum tantivy::schema::FieldType [−][src]
pub enum FieldType { Str(TextOptions), U64(IntOptions), I64(IntOptions), HierarchicalFacet, Bytes, }
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
HierarchicalFacet
Hierachical Facet
Bytes
Bytes (one per document)
Methods
impl FieldType
[src]
impl FieldType
pub fn value_type(&self) -> Type
[src]
pub fn value_type(&self) -> Type
Returns the value type associated for this field.
pub fn is_indexed(&self) -> bool
[src]
pub fn is_indexed(&self) -> bool
returns true iff the field is indexed.
pub fn get_index_record_option(&self) -> Option<IndexRecordOption>
[src]
pub fn get_index_record_option(&self) -> Option<IndexRecordOption>
Given a field configuration, return the maximal possible
IndexRecordOption
available.
If the field is not indexed, then returns None
.
pub fn value_from_json(
&self,
json: &JsonValue
) -> Result<Value, ValueParsingError>
[src]
pub fn value_from_json(
&self,
json: &JsonValue
) -> Result<Value, ValueParsingError>
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
impl Clone for FieldType
[src]
impl Clone for FieldType
fn clone(&self) -> FieldType
[src]
fn clone(&self) -> FieldType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for FieldType
[src]
impl Debug for FieldType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for FieldType
[src]
impl Eq for FieldType
impl PartialEq for FieldType
[src]
impl PartialEq for FieldType