Struct tantivy::schema::FieldEntry
source · [−]pub struct FieldEntry { /* private fields */ }
Expand description
A FieldEntry
represents a field and its configuration.
Schema
are a collection of FieldEntry
It consists of
- a field name
- a field type, itself wrapping up options describing how the field should be indexed.
Implementations
sourceimpl FieldEntry
impl FieldEntry
sourcepub fn new(field_name: String, field_type: FieldType) -> FieldEntry
pub fn new(field_name: String, field_type: FieldType) -> FieldEntry
Creates a new field entry given a name and a field type
sourcepub fn new_text(field_name: String, text_options: TextOptions) -> FieldEntry
pub fn new_text(field_name: String, text_options: TextOptions) -> FieldEntry
Creates a new text field entry.
sourcepub fn new_u64(field_name: String, int_options: NumericOptions) -> FieldEntry
pub fn new_u64(field_name: String, int_options: NumericOptions) -> FieldEntry
Creates a new u64 field entry.
sourcepub fn new_i64(field_name: String, int_options: NumericOptions) -> FieldEntry
pub fn new_i64(field_name: String, int_options: NumericOptions) -> FieldEntry
Creates a new i64 field entry.
sourcepub fn new_f64(field_name: String, f64_options: NumericOptions) -> FieldEntry
pub fn new_f64(field_name: String, f64_options: NumericOptions) -> FieldEntry
Creates a new f64 field entry.
sourcepub fn new_date(field_name: String, date_options: NumericOptions) -> FieldEntry
pub fn new_date(field_name: String, date_options: NumericOptions) -> FieldEntry
Creates a new date field entry.
sourcepub fn new_facet(field_name: String, facet_options: FacetOptions) -> FieldEntry
pub fn new_facet(field_name: String, facet_options: FacetOptions) -> FieldEntry
Creates a field entry for a facet.
sourcepub fn new_bytes(field_name: String, bytes_options: BytesOptions) -> FieldEntry
pub fn new_bytes(field_name: String, bytes_options: BytesOptions) -> FieldEntry
Creates a field entry for a bytes field
sourcepub fn new_json(
field_name: String,
json_object_options: JsonObjectOptions
) -> FieldEntry
pub fn new_json(
field_name: String,
json_object_options: JsonObjectOptions
) -> FieldEntry
Creates a field entry for a json field
sourcepub fn field_type(&self) -> &FieldType
pub fn field_type(&self) -> &FieldType
Returns the field type
sourcepub fn is_indexed(&self) -> bool
pub fn is_indexed(&self) -> bool
Returns true if the field is indexed.
An indexed field is searchable.
sourcepub fn has_fieldnorms(&self) -> bool
pub fn has_fieldnorms(&self) -> bool
Returns true if the field is normed
Trait Implementations
sourceimpl Clone for FieldEntry
impl Clone for FieldEntry
sourcefn clone(&self) -> FieldEntry
fn clone(&self) -> FieldEntry
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 FieldEntry
impl Debug for FieldEntry
sourceimpl<'de> Deserialize<'de> for FieldEntry
impl<'de> Deserialize<'de> for FieldEntry
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 PartialEq<FieldEntry> for FieldEntry
impl PartialEq<FieldEntry> for FieldEntry
sourcefn eq(&self, other: &FieldEntry) -> bool
fn eq(&self, other: &FieldEntry) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FieldEntry) -> bool
fn ne(&self, other: &FieldEntry) -> bool
This method tests for !=
.
sourceimpl Serialize for FieldEntry
impl Serialize for FieldEntry
impl StructuralPartialEq for FieldEntry
Auto Trait Implementations
impl RefUnwindSafe for FieldEntry
impl Send for FieldEntry
impl Sync for FieldEntry
impl Unpin for FieldEntry
impl UnwindSafe for FieldEntry
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