[−][src]Enum tantivy::schema::FieldType
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,
Hierachical Facet
Bytes (one per document)
Methods
impl FieldType
[src]
pub fn value_type(&self) -> Type
[src]
Returns the value type associated for this field.
pub fn is_indexed(&self) -> bool
[src]
returns true iff the field is indexed.
pub fn get_index_record_option(&self) -> Option<IndexRecordOption>
[src]
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]
&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 Debug for FieldType
[src]
impl Eq for FieldType
[src]
impl PartialEq<FieldType> for FieldType
[src]
impl StructuralEq for FieldType
[src]
impl StructuralPartialEq for FieldType
[src]
Auto Trait Implementations
impl RefUnwindSafe for FieldType
impl Send for FieldType
impl Sync for FieldType
impl Unpin for FieldType
impl UnwindSafe for FieldType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T> Fruit for T where
T: Send + Downcast,
[src]
T: Send + Downcast,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,