pub struct IndexHolder { /* private fields */ }Implementations§
Source§impl IndexHolder
impl IndexHolder
Sourcepub 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>
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
Sourcepub fn create_memory_index(index_builder: IndexBuilder) -> SummaResult<Index>
pub fn create_memory_index(index_builder: IndexBuilder) -> SummaResult<Index>
Creates index and sets it up via setup
pub async fn open_remote_index<TExternalRequest: ExternalRequest + 'static, TExternalRequestGenerator: ExternalRequestGenerator<TExternalRequest> + 'static>( remote_engine_config: RemoteEngineConfig, read_hotcache: bool, ) -> SummaResult<Index>
Sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
Compression
Sourcepub fn index_attributes(&self) -> Option<&IndexAttributes>
pub fn index_attributes(&self) -> Option<&IndexAttributes>
Load index attributes from meta.json
Sourcepub fn conflict_strategy(&self) -> ConflictStrategy
pub fn conflict_strategy(&self) -> ConflictStrategy
How to resolve conflicts on inserting new documents
Sourcepub fn index_name(&self) -> &str
pub fn index_name(&self) -> &str
Index name
Sourcepub fn index_reader(&self) -> &IndexReader
pub fn index_reader(&self) -> &IndexReader
IndexReader singleton
pub fn index_engine_config(&self) -> &Arc<dyn ConfigProxy<IndexEngineConfig>>
pub fn index_writer_holder( &self, ) -> SummaResult<&Arc<RwLock<IndexWriterHolder>>>
Sourcepub fn multi_fields(&self) -> &HashSet<Field>
pub fn multi_fields(&self) -> &HashSet<Field>
Multi fields
Sourcepub fn real_directory(&self) -> &dyn Directory
pub fn real_directory(&self) -> &dyn Directory
Return internal Tantivy index
Sourcepub async fn partial_warmup<T: AsRef<str>>(
&self,
load_dictionaries: bool,
fields: &[T],
) -> SummaResult<()>
pub async fn partial_warmup<T: AsRef<str>>( &self, load_dictionaries: bool, fields: &[T], ) -> SummaResult<()>
Load term dictionaries into memory
Sourcepub async fn full_warmup(&self) -> SummaResult<()>
pub async fn full_warmup(&self) -> SummaResult<()>
Load all index files into memory
Sourcepub async fn search_in_segments_async(
&self,
searcher: &Searcher,
query: &dyn Query,
collector: &MultiCollector<'_>,
is_fieldnorms_scoring_enabled: Option<bool>,
) -> Result<MultiFruit>
pub async fn search_in_segments_async( &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.
pub fn search_in_segments( &self, searcher: &Searcher, query: &dyn Query, collector: &MultiCollector<'_>, is_fieldnorms_scoring_enabled: Option<bool>, ) -> Result<MultiFruit>
pub fn search( &self, index_alias: &str, query: Query, collectors: Vec<Collector>, ) -> SummaResult<Vec<IntermediateExtractionResult>>
Sourcepub async fn custom_search_async(
&self,
index_alias: &str,
query: Query,
collectors: Vec<Collector>,
is_fieldnorms_scoring_enabled: Option<bool>,
load_cache: Option<bool>,
store_cache: Option<bool>,
) -> SummaResult<Vec<IntermediateExtractionResult>>
pub async fn custom_search_async( &self, index_alias: &str, query: Query, collectors: Vec<Collector>, is_fieldnorms_scoring_enabled: Option<bool>, load_cache: Option<bool>, store_cache: Option<bool>, ) -> SummaResult<Vec<IntermediateExtractionResult>>
Search query in the IndexHolder and collecting Fruit with a list of collectors
Sourcepub fn custom_search(
&self,
index_alias: &str,
query: Query,
collectors: Vec<Collector>,
is_fieldnorms_scoring_enabled: Option<bool>,
load_cache: Option<bool>,
store_cache: Option<bool>,
) -> SummaResult<Vec<IntermediateExtractionResult>>
pub fn custom_search( &self, index_alias: &str, query: Query, collectors: Vec<Collector>, is_fieldnorms_scoring_enabled: Option<bool>, load_cache: Option<bool>, store_cache: Option<bool>, ) -> SummaResult<Vec<IntermediateExtractionResult>>
Search query in the IndexHolder and collecting Fruit with a list of collectors
Sourcepub async fn delete_documents(&self, query: Query) -> SummaResult<u64>
pub async fn delete_documents(&self, query: Query) -> SummaResult<u64>
Delete SummaDocument by unq
Sourcepub async fn index_document(
&self,
document_bytes: &[u8],
skip_updated_at_modification: bool,
) -> SummaResult<()>
pub async fn index_document( &self, document_bytes: &[u8], skip_updated_at_modification: bool, ) -> SummaResult<()>
Index generic SummaDocument
IndexUpdater bounds unbounded SummaDocument inside
Sourcepub async fn index_bulk(
&self,
documents: &Vec<Vec<u8>>,
conflict_strategy: Option<ConflictStrategy>,
) -> SummaResult<(u64, u64)>
pub async fn index_bulk( &self, documents: &Vec<Vec<u8>>, conflict_strategy: Option<ConflictStrategy>, ) -> SummaResult<(u64, u64)>
Index multiple documents at a time
pub fn space_usage(&self) -> SummaResult<SearcherSpaceUsage>
pub fn clear_collector_cache(&self)
Trait Implementations§
Source§impl Debug for IndexHolder
impl Debug for IndexHolder
Source§impl Hash for IndexHolder
impl Hash for IndexHolder
Source§impl PartialEq for IndexHolder
impl PartialEq for IndexHolder
Auto Trait Implementations§
impl !Freeze for IndexHolder
impl !RefUnwindSafe for IndexHolder
impl Send for IndexHolder
impl Sync for IndexHolder
impl Unpin for IndexHolder
impl !UnwindSafe for IndexHolder
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
Mutably borrows from an owned value. Read more
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more