Struct tantivy::DateOptions
source · [−]pub struct DateOptions { /* private fields */ }
Expand description
Defines how DateTime field should be handled by tantivy.
Implementations
sourceimpl DateOptions
impl DateOptions
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) -> DateOptions
pub fn set_stored(self) -> DateOptions
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) -> DateOptions
pub fn set_indexed(self) -> DateOptions
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) -> DateOptions
pub fn set_fieldnorm(self) -> DateOptions
Set the field with fieldnorm.
Setting an integer as fieldnorm will generate the fieldnorm data for it.
sourcepub fn set_fast(self, cardinality: Cardinality) -> DateOptions
pub fn set_fast(self, cardinality: Cardinality) -> DateOptions
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 with 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
.
sourcepub fn set_precision(self, precision: DatePrecision) -> DateOptions
pub fn set_precision(self, precision: DatePrecision) -> DateOptions
Sets the precision for this DateTime field.
Internal storage precision, used to optimize storage compression on fast fields.
sourcepub fn get_precision(&self) -> DatePrecision
pub fn get_precision(&self) -> DatePrecision
Returns the storage precision for this DateTime field.
Internal storage precision, used to optimize storage compression on fast fields.
Trait Implementations
sourceimpl<T: Into<DateOptions>> BitOr<T> for DateOptions
impl<T: Into<DateOptions>> BitOr<T> for DateOptions
type Output = DateOptions
type Output = DateOptions
|
operator.sourcefn bitor(self, other: T) -> DateOptions
fn bitor(self, other: T) -> DateOptions
|
operation. Read moresourceimpl Clone for DateOptions
impl Clone for DateOptions
sourcefn clone(&self) -> DateOptions
fn clone(&self) -> DateOptions
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for DateOptions
impl Debug for DateOptions
sourceimpl Default for DateOptions
impl Default for DateOptions
sourcefn default() -> DateOptions
fn default() -> DateOptions
sourceimpl<'de> Deserialize<'de> for DateOptions
impl<'de> Deserialize<'de> for DateOptions
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>,
sourceimpl From<()> for DateOptions
impl From<()> for DateOptions
sourcefn from(_: ()) -> DateOptions
fn from(_: ()) -> DateOptions
sourceimpl PartialEq<DateOptions> for DateOptions
impl PartialEq<DateOptions> for DateOptions
sourcefn eq(&self, other: &DateOptions) -> bool
fn eq(&self, other: &DateOptions) -> bool
sourceimpl Serialize for DateOptions
impl Serialize for DateOptions
impl Eq for DateOptions
impl StructuralEq for DateOptions
impl StructuralPartialEq for DateOptions
Auto Trait Implementations
impl RefUnwindSafe for DateOptions
impl Send for DateOptions
impl Sync for DateOptions
impl Unpin for DateOptions
impl UnwindSafe for DateOptions
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
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>
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 moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<T> DowncastSync for Twhere
T: Any + Send + Sync,
impl<T> DowncastSync for Twhere
T: Any + Send + Sync,
sourcefn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>
Arc<Trait>
(where Trait: Downcast
) to Arc<Any>
. Arc<Any>
can then be
further downcast
into Arc<ConcreteType>
where ConcreteType
implements Trait
. Read more