Rename the PrefixCache into PrefixDocumentsCache

This commit is contained in:
Clément Renault
2019-12-30 11:44:42 +01:00
parent 1a5a104f13
commit 58836d89aa
8 changed files with 44 additions and 44 deletions

View File

@ -109,7 +109,7 @@ pub fn apply_documents_addition<'a, 'b>(
documents_fields_counts_store: store::DocumentsFieldsCounts,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
addition: Vec<HashMap<String, serde_json::Value>>,
) -> MResult<()> {
let mut documents_additions = HashMap::new();
@ -176,7 +176,7 @@ pub fn apply_documents_addition<'a, 'b>(
main_store,
postings_lists_store,
docs_words_store,
prefix_cache_store,
prefix_documents_cache_store,
&ranked_map,
number_of_inserted_documents,
indexer,
@ -190,7 +190,7 @@ pub fn apply_documents_partial_addition<'a, 'b>(
documents_fields_counts_store: store::DocumentsFieldsCounts,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
addition: Vec<HashMap<String, serde_json::Value>>,
) -> MResult<()> {
let mut documents_additions = HashMap::new();
@ -274,7 +274,7 @@ pub fn apply_documents_partial_addition<'a, 'b>(
main_store,
postings_lists_store,
docs_words_store,
prefix_cache_store,
prefix_documents_cache_store,
&ranked_map,
number_of_inserted_documents,
indexer,
@ -288,7 +288,7 @@ pub fn reindex_all_documents(
documents_fields_counts_store: store::DocumentsFieldsCounts,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
) -> MResult<()> {
let schema = match main_store.schema(writer)? {
Some(schema) => schema,
@ -350,7 +350,7 @@ pub fn reindex_all_documents(
main_store,
postings_lists_store,
docs_words_store,
prefix_cache_store,
prefix_documents_cache_store,
&ranked_map,
number_of_inserted_documents,
indexer,
@ -365,7 +365,7 @@ pub fn write_documents_addition_index(
main_store: store::Main,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
ranked_map: &RankedMap,
number_of_inserted_documents: usize,
indexer: RawIndexer,

View File

@ -281,7 +281,7 @@ pub fn update_task<'a, 'b>(
index.documents_fields_counts,
index.postings_lists,
index.docs_words,
index.prefix_cache,
index.prefix_documents_cache,
);
(update_type, result, start.elapsed())
@ -308,7 +308,7 @@ pub fn update_task<'a, 'b>(
index.documents_fields_counts,
index.postings_lists,
index.docs_words,
index.prefix_cache,
index.prefix_documents_cache,
documents,
);
@ -339,7 +339,7 @@ pub fn update_task<'a, 'b>(
index.postings_lists,
index.documents_fields_counts,
index.synonyms,
index.prefix_cache,
index.prefix_documents_cache,
).unwrap();
let mut prefix = [0; 4];
@ -347,7 +347,7 @@ pub fn update_task<'a, 'b>(
prefix[..len].copy_from_slice(&s.as_bytes()[..len]);
for (i, document) in documents.into_iter().enumerate() {
index.prefix_cache.put_prefix_document(
index.prefix_documents_cache.put_prefix_document(
writer,
prefix,
i,
@ -381,7 +381,7 @@ pub fn update_task<'a, 'b>(
index.documents_fields_counts,
index.postings_lists,
index.docs_words,
index.prefix_cache,
index.prefix_documents_cache,
documents,
);
@ -443,7 +443,7 @@ pub fn update_task<'a, 'b>(
index.documents_fields_counts,
index.postings_lists,
index.docs_words,
index.prefix_cache,
index.prefix_documents_cache,
stop_words,
);

View File

@ -13,7 +13,7 @@ pub fn apply_schema_update(
documents_fields_counts_store: store::DocumentsFieldsCounts,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
) -> MResult<()> {
use UnsupportedOperation::{
CanOnlyIntroduceNewSchemaAttributesAtEnd, CannotRemoveSchemaAttribute,
@ -56,7 +56,7 @@ pub fn apply_schema_update(
documents_fields_counts_store,
postings_lists_store,
docs_words_store,
prefix_cache_store,
prefix_documents_cache_store,
)?
}

View File

@ -68,7 +68,7 @@ pub fn apply_stop_words_deletion(
documents_fields_counts_store: store::DocumentsFieldsCounts,
postings_lists_store: store::PostingsLists,
docs_words_store: store::DocsWords,
prefix_cache_store: store::PrefixCache,
prefix_documents_cache_store: store::PrefixDocumentsCache,
deletion: BTreeSet<String>,
) -> MResult<()> {
let mut stop_words_builder = SetBuilder::memory();
@ -111,7 +111,7 @@ pub fn apply_stop_words_deletion(
documents_fields_counts_store,
postings_lists_store,
docs_words_store,
prefix_cache_store,
prefix_documents_cache_store,
)?;
}
}