Struct tantivy::schema::NumericOptions
source · [−]pub struct NumericOptions { /* private fields */ }
Expand description
Define how an u64, i64, of f64 field should be handled by tantivy.
Implementations
sourceimpl NumericOptions
impl NumericOptions
sourcepub fn is_indexed(&self) -> bool
pub fn is_indexed(&self) -> bool
Returns true iff the value is indexed and therefore searchable.
sourcepub fn fieldnorms(&self) -> bool
pub fn fieldnorms(&self) -> bool
Returns true iff the field has fieldnorm.
sourcepub fn is_multivalue_fast(&self) -> bool
pub fn is_multivalue_fast(&self) -> bool
Returns true iff the value is a fast field and multivalue.
sourcepub fn set_stored(self) -> NumericOptions
pub fn set_stored(self) -> NumericOptions
Set the field as stored.
Only the fields that are set as stored are persisted into the Tantivy’s store.
sourcepub fn set_indexed(self) -> NumericOptions
pub fn set_indexed(self) -> NumericOptions
Set the field as indexed.
Setting an integer as indexed will generate a posting list for each value taken by the integer.
This is required for the field to be searchable.
sourcepub fn set_fieldnorm(self) -> NumericOptions
pub fn set_fieldnorm(self) -> NumericOptions
Set the field with fieldnorm.
Setting an integer as fieldnorm will generate the fieldnorm data for it.
sourcepub fn set_fast(self, cardinality: Cardinality) -> NumericOptions
pub fn set_fast(self, cardinality: Cardinality) -> NumericOptions
Set the field as a single-valued fast field.
Fast fields are designed for random access. Access time are similar to a random lookup in an array. If more than one value is associated to a fast field, only the last one is kept.
sourcepub fn get_fastfield_cardinality(&self) -> Option<Cardinality>
pub fn get_fastfield_cardinality(&self) -> Option<Cardinality>
Returns the cardinality of the fastfield.
If the field has not been declared as a fastfield, then the method returns None.
Trait Implementations
sourceimpl<T: Into<NumericOptions>> BitOr<T> for NumericOptions
impl<T: Into<NumericOptions>> BitOr<T> for NumericOptions
type Output = NumericOptions
type Output = NumericOptions
The resulting type after applying the |
operator.
sourcefn bitor(self, other: T) -> NumericOptions
fn bitor(self, other: T) -> NumericOptions
Performs the |
operation. Read more
sourceimpl Clone for NumericOptions
impl Clone for NumericOptions
sourcefn clone(&self) -> NumericOptions
fn clone(&self) -> NumericOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NumericOptions
impl Debug for NumericOptions
sourceimpl Default for NumericOptions
impl Default for NumericOptions
sourcefn default() -> NumericOptions
fn default() -> NumericOptions
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for NumericOptions
impl<'de> Deserialize<'de> for NumericOptions
sourcefn 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
sourceimpl From<()> for NumericOptions
impl From<()> for NumericOptions
sourcefn from(_: ()) -> NumericOptions
fn from(_: ()) -> NumericOptions
Converts to this type from the input type.
sourceimpl PartialEq<NumericOptions> for NumericOptions
impl PartialEq<NumericOptions> for NumericOptions
sourcefn eq(&self, other: &NumericOptions) -> bool
fn eq(&self, other: &NumericOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &NumericOptions) -> bool
fn ne(&self, other: &NumericOptions) -> bool
This method tests for !=
.
sourceimpl Serialize for NumericOptions
impl Serialize for NumericOptions
impl Eq for NumericOptions
impl StructuralEq for NumericOptions
impl StructuralPartialEq for NumericOptions
Auto Trait Implementations
impl RefUnwindSafe for NumericOptions
impl Send for NumericOptions
impl Sync for NumericOptions
impl Unpin for NumericOptions
impl UnwindSafe for NumericOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more