Struct tantivy::schema::DateOptions
source · pub struct DateOptions { /* private fields */ }
Expand description
Defines how DateTime field should be handled by tantivy.
Implementations§
source§impl 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 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) -> DateOptions
pub fn set_fast(self) -> DateOptions
Set the field as a fast field.
Fast fields are designed for random access.
sourcepub fn set_precision(self, precision: DateTimePrecision) -> DateOptions
pub fn set_precision(self, precision: DateTimePrecision) -> DateOptions
Sets the precision for this DateTime field on the fast field.
Indexed precision is always DATE_TIME_PRECISION_INDEXED
.
Internal storage precision, used to optimize storage compression on fast fields.
sourcepub fn get_precision(&self) -> DateTimePrecision
pub fn get_precision(&self) -> DateTimePrecision
Returns the storage precision for this DateTime field.
Internal storage precision, used to optimize storage compression on fast fields.
Trait Implementations§
source§impl<T: Into<DateOptions>> BitOr<T> for DateOptions
impl<T: Into<DateOptions>> BitOr<T> for DateOptions
§type Output = DateOptions
type Output = DateOptions
|
operator.source§fn bitor(self, other: T) -> DateOptions
fn bitor(self, other: T) -> DateOptions
|
operation. Read moresource§impl Clone for DateOptions
impl Clone for DateOptions
source§fn clone(&self) -> DateOptions
fn clone(&self) -> DateOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DateOptions
impl Debug for DateOptions
source§impl Default for DateOptions
impl Default for DateOptions
source§fn default() -> DateOptions
fn default() -> DateOptions
source§impl<'de> Deserialize<'de> for DateOptions
impl<'de> Deserialize<'de> for DateOptions
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>,
source§impl From<()> for DateOptions
impl From<()> for DateOptions
source§fn from(_: ()) -> DateOptions
fn from(_: ()) -> DateOptions
source§impl PartialEq for DateOptions
impl PartialEq for DateOptions
source§fn eq(&self, other: &DateOptions) -> bool
fn eq(&self, other: &DateOptions) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DateOptions
impl Serialize for DateOptions
impl Eq for DateOptions
impl StructuralPartialEq for DateOptions
Auto Trait Implementations§
impl Freeze for DateOptions
impl RefUnwindSafe for DateOptions
impl Send for DateOptions
impl Sync for DateOptions
impl Unpin for DateOptions
impl UnwindSafe for DateOptions
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
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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.