pub struct IndexHolder { /* private fields */ }

Implementations§

source§

impl IndexHolder

source

pub fn create_holder( core_config: &Config, index: Index, index_name: &str, index_engine_config: Arc<dyn ConfigProxy<IndexEngineConfig>>, merge_policy: Option<MergePolicy>, query_parser_config: QueryParserConfig ) -> SummaResult<IndexHolder>

Sets up IndexHolder

source

pub fn create_memory_index(index_builder: IndexBuilder) -> SummaResult<Index>

Creates index and sets it up via setup

source

pub async fn open_remote_index<TExternalRequest: ExternalRequest + 'static, TExternalRequestGenerator: ExternalRequestGenerator<TExternalRequest> + 'static>( remote_engine_config: RemoteEngineConfig, read_hotcache: bool ) -> SummaResult<Index>

source

pub fn compression(&self) -> Compression

Compression

source

pub fn index_attributes(&self) -> Option<&IndexAttributes>

Load index attributes from meta.json

source

pub fn conflict_strategy(&self) -> ConflictStrategy

How to resolve conflicts on inserting new documents

source

pub fn index_name(&self) -> &str

Index name

source

pub fn index_reader(&self) -> &IndexReader

IndexReader singleton

source

pub fn index(&self) -> &Index

Return internal Tantivy index

source

pub fn index_engine_config(&self) -> &Arc<dyn ConfigProxy<IndexEngineConfig>>

source

pub fn index_writer_holder( &self ) -> SummaResult<&Arc<RwLock<IndexWriterHolder>>>

source

pub fn schema(&self) -> &Schema

Index schema

source

pub fn multi_fields(&self) -> &HashSet<Field>

Multi fields

source

pub fn real_directory(&self) -> &dyn Directory

Return internal Tantivy index

source

pub async fn partial_warmup<T: AsRef<str>>( &self, load_dictionaries: bool, fields: &[T] ) -> SummaResult<()>

Load term dictionaries into memory

source

pub async fn full_warmup(&self) -> SummaResult<()>

Load all index files into memory

source

pub async fn search_in_segments( &self, searcher: &Searcher, query: &dyn Query, collector: &MultiCollector<'_>, is_fieldnorms_scoring_enabled: Option<bool> ) -> Result<MultiFruit>

Runs a query on the segment readers wrapped by the searcher asynchronously.

source

pub async fn search( &self, index_alias: &str, query: Query, collectors: Vec<Collector> ) -> SummaResult<Vec<IntermediateExtractionResult>>

Search query in the IndexHolder and collecting Fruit with a list of collectors

source

pub async fn delete_documents(&self, query: Query) -> SummaResult<u64>

Delete SummaDocument by unq

source

pub async fn index_document( &self, document: SummaDocument<'_> ) -> SummaResult<()>

Index generic SummaDocument

IndexUpdater bounds unbounded SummaDocument inside

source

pub async fn index_bulk( &self, documents: &Vec<Vec<u8>>, conflict_strategy: Option<ConflictStrategy> ) -> SummaResult<(u64, u64)>

Index multiple documents at a time

source

pub fn space_usage(&self) -> SummaResult<SearcherSpaceUsage>

source

pub fn clear_collector_cache(&self)

Trait Implementations§

source§

impl Debug for IndexHolder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for IndexHolder

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for IndexHolder

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where H: Hash + ?Sized, B: BuildHasher,

source§

impl<T> Downcast for Twhere T: Any,

source§

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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Fruit for Twhere T: Send + Downcast,