Struct tantivy::schema::NumericOptions
source · pub struct NumericOptions { /* private fields */ }
Expand description
Define how an u64
, i64
, or f64
field should be handled by tantivy.
Implementations§
source§impl 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 should_coerce(&self) -> bool
pub fn should_coerce(&self) -> bool
Returns true if values should be coerced to numbers.
sourcepub fn set_coerce(self) -> Self
pub fn set_coerce(self) -> Self
Try to coerce values if they are not a number. Defaults to false.
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) -> NumericOptions
pub fn set_fast(self) -> NumericOptions
Set the field as a fast field.
Fast fields are designed for random access.
Trait Implementations§
source§impl<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.source§fn bitor(self, other: T) -> NumericOptions
fn bitor(self, other: T) -> NumericOptions
Performs the
|
operation. Read moresource§impl Clone for NumericOptions
impl Clone for NumericOptions
source§fn clone(&self) -> NumericOptions
fn clone(&self) -> NumericOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NumericOptions
impl Debug for NumericOptions
source§impl Default for NumericOptions
impl Default for NumericOptions
source§fn default() -> NumericOptions
fn default() -> NumericOptions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for NumericOptions
impl<'de> Deserialize<'de> for NumericOptions
source§fn 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
source§impl From<()> for NumericOptions
impl From<()> for NumericOptions
source§fn from(_: ()) -> NumericOptions
fn from(_: ()) -> NumericOptions
Converts to this type from the input type.
source§impl PartialEq for NumericOptions
impl PartialEq for NumericOptions
source§fn 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 ==
.source§impl Serialize for NumericOptions
impl Serialize for NumericOptions
impl Eq for NumericOptions
impl StructuralPartialEq for NumericOptions
Auto Trait Implementations§
impl Freeze for NumericOptions
impl RefUnwindSafe for NumericOptions
impl Send for NumericOptions
impl Sync for NumericOptions
impl Unpin for NumericOptions
impl UnwindSafe for NumericOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn 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.source§fn 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.