Struct pallet::search::IndexBuilder [−][src]
Builder for an Index
Implementations
impl<T> IndexBuilder<T>
[src]
pub fn with_index_dir<I: Into<PathBuf>>(mut self: Self, index_dir: I) -> Self
[src]
Use the given directory (must exist) for the tantivy::Index
.
pub fn with_writer_accessor<F>(mut self: Self, writer_accessor: F) -> Self where
F: Fn(&Index) -> Result<IndexWriter> + Send + Sync + 'static,
[src]
F: Fn(&Index) -> Result<IndexWriter> + Send + Sync + 'static,
Define a custom way to get the tantivy::IndexWriter
.
By default will use tantivy_index.writer(128_000_000)
.
pub fn with_config<F>(mut self: Self, config: F) -> Self where
F: Fn(&mut Index) -> Result<()> + 'static,
[src]
F: Fn(&mut Index) -> Result<()> + 'static,
Custom configuration for the tantivy::Index
.
By default will use tantivy_index.set_default_multithread_executor()?
.
pub fn with_id_field_name<I: Into<String>>(
mut self: Self,
id_field_name: I
) -> Self
[src]
mut self: Self,
id_field_name: I
) -> Self
Set the field name to be used for the datastore id
.
By default will use __id__
.
pub fn with_fields_builder<F>(mut self: Self, fields_builder: F) -> Self where
F: Fn(&mut SchemaBuilder) -> Result<T> + 'static,
[src]
F: Fn(&mut SchemaBuilder) -> Result<T> + 'static,
Handler that adds fields to a schema, and returns them in the fields container
pub fn with_default_search_fields_builder<F>(
mut self: Self,
default_search_fields_builder: F
) -> Self where
F: Fn(&T) -> Vec<Field> + 'static,
[src]
mut self: Self,
default_search_fields_builder: F
) -> Self where
F: Fn(&T) -> Vec<Field> + 'static,
Given the fields container, return fields that should be used in default search.
pub fn finish(self) -> Result<Index<T>>
[src]
Convert into finished Index
Trait Implementations
impl<T> Default for IndexBuilder<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for IndexBuilder<T>
[src]
impl<T> !Send for IndexBuilder<T>
[src]
impl<T> !Sync for IndexBuilder<T>
[src]
impl<T> Unpin for IndexBuilder<T>
[src]
impl<T> !UnwindSafe for IndexBuilder<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,