From deb1e375c1ed984202490a4073e0d10c1dbdfb9d Mon Sep 17 00:00:00 2001 From: Felix Meisen Date: Fri, 13 Dec 2024 09:58:09 +0100 Subject: [PATCH] Changed the ambiguous naming of nofNonLiterals to nofNonLiteralsInTextIndex everywhere aswell as num-non-literals to nom-non-literals-text-index --- src/index/IndexImpl.Text.cpp | 5 +++-- src/index/IndexImpl.cpp | 2 +- src/index/IndexImpl.h | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/index/IndexImpl.Text.cpp b/src/index/IndexImpl.Text.cpp index 397a227854..76c0015974 100644 --- a/src/index/IndexImpl.Text.cpp +++ b/src/index/IndexImpl.Text.cpp @@ -299,8 +299,9 @@ void IndexImpl::processWordsForInvertedLists(const string& contextFile, textMeta_.setNofTextRecords(nofContexts); textMeta_.setNofWordPostings(nofWordPostings); textMeta_.setNofEntityPostings(nofEntityPostings); - nofNonLiterals_ = nofContexts - nofLiterals; - configurationJson_["num-non-literals"] = nofNonLiterals_; + nofNonLiteralsInTextIndex_ = nofContexts - nofLiterals; + configurationJson_["num-non-literals-text-index"] = + nofNonLiteralsInTextIndex_; writeConfiguration(); writer.finish(); diff --git a/src/index/IndexImpl.cpp b/src/index/IndexImpl.cpp index 41f9cf50ff..4f5ce915fe 100644 --- a/src/index/IndexImpl.cpp +++ b/src/index/IndexImpl.cpp @@ -1128,7 +1128,7 @@ void IndexImpl::readConfiguration() { loadDataMember("num-subjects", numSubjects_, NumNormalAndInternal{}); loadDataMember("num-objects", numObjects_, NumNormalAndInternal{}); loadDataMember("num-triples", numTriples_, NumNormalAndInternal{}); - loadDataMember("num-non-literals", nofNonLiterals_, 0); + loadDataMember("num-non-literals-text-index", nofNonLiteralsInTextIndex_, 0); // Initialize BlankNodeManager uint64_t numBlankNodesTotal; diff --git a/src/index/IndexImpl.h b/src/index/IndexImpl.h index 37041cc301..b98d0d5788 100644 --- a/src/index/IndexImpl.h +++ b/src/index/IndexImpl.h @@ -161,7 +161,7 @@ class IndexImpl { // Keeps track of the number of nonLiteral contexts in the index this is used // in the test retrieval of the texts. This only works reliably if the // wordsFile.tsv starts with contextId 1 and is continuous. - size_t nofNonLiterals_; + size_t nofNonLiteralsInTextIndex_; // Global static pointers to the currently active index and comparator. // Those are used to compare LocalVocab entries with each other as well as @@ -429,7 +429,9 @@ class IndexImpl { size_t getNofEntityPostings() const { return textMeta_.getNofEntityPostings(); } - size_t getNofNonLiteralsInTextIndex() const { return nofNonLiterals_; } + size_t getNofNonLiteralsInTextIndex() const { + return nofNonLiteralsInTextIndex_; + } bool hasAllPermutations() const { return SPO().isLoaded(); }