diff --git a/src/global/Pattern.h b/src/global/Pattern.h index 9c37eb39ce..1005add22d 100644 --- a/src/global/Pattern.h +++ b/src/global/Pattern.h @@ -194,9 +194,6 @@ struct CompactStringVectorWriter { commonInitialization(); } - CompactStringVectorWriter(CompactStringVectorWriter&&) = default; - CompactStringVectorWriter& operator=(CompactStringVectorWriter&&) = default; - void push(const data_type* data, size_t elementSize) { AD_CONTRACT_CHECK(!_finished); _offsets.push_back(_nextOffset); diff --git a/src/index/IndexBuilderMain.cpp b/src/index/IndexBuilderMain.cpp index c75fd5d427..29b11eae9b 100644 --- a/src/index/IndexBuilderMain.cpp +++ b/src/index/IndexBuilderMain.cpp @@ -168,7 +168,6 @@ int main(int argc, char** argv) { std::optional stxxlMemory; std::optional parserBufferSize; std::optional vocabType; - // VocabularyEnum vocabType; optind = 1; Index index{ad_utility::makeUnlimitedAllocator()}; @@ -228,8 +227,9 @@ int main(int argc, char** argv) { "Only build the PSO and POS permutations. This is faster, but then " "queries with predicate variables are not supported"); add("vocabulary-type", po::value(&vocabType), - "The vocabulary implementation for strings in qlever, can be any of ... " - "(TODO joka)"); + absl::StrCat( + "The vocabulary implementation for strings in qlever, can be any of ", + ad_utility::VocabularyType::getListOfSupportedValues())); // Options for the index building process. add("stxxl-memory,m", po::value(&stxxlMemory), @@ -262,11 +262,10 @@ int main(int argc, char** argv) { if (parserBufferSize.has_value()) { index.parserBufferSize() = parserBufferSize.value(); } - /* + if (vocabType.has_value()) { index.getImpl().setVocabularyTypeForIndexBuilding(vocabType.value()); } - */ // If no text index name was specified, take the part of the wordsfile after // the last slash. diff --git a/src/index/IndexImpl.cpp b/src/index/IndexImpl.cpp index 3ad2e997ec..9d8f89c19f 100644 --- a/src/index/IndexImpl.cpp +++ b/src/index/IndexImpl.cpp @@ -1133,8 +1133,6 @@ void IndexImpl::readConfiguration() { loadDataMember("num-triples", numTriples_, NumNormalAndInternal{}); loadDataMember("num-non-literals-text-index", nofNonLiteralsInTextIndex_, 0); - // TODO Comment and also write the configuration. - // The default value is the one the used to be the only. ad_utility::VocabularyType vocabType( ad_utility::VocabularyType::Enum::CompressedOnDisk); loadDataMember("vocabulary-type", vocabType, vocabType); diff --git a/src/index/IndexImpl.h b/src/index/IndexImpl.h index aaa6d0a1f1..a8828f2236 100644 --- a/src/index/IndexImpl.h +++ b/src/index/IndexImpl.h @@ -192,6 +192,8 @@ class IndexImpl { std::optional idOfHasPatternDuringIndexBuilding_; std::optional idOfInternalGraphDuringIndexBuilding_; + // The vocabulary type that is used (only relevant during index building). + // The default is chosen s.t. the compatibility to old index builds. ad_utility::VocabularyType vocabularyTypeForIndexBuilding_{ ad_utility::VocabularyType::Enum::CompressedOnDisk}; diff --git a/src/index/vocabulary/VocabularyType.h b/src/index/vocabulary/VocabularyType.h index 4e65a481df..a6b0eacfb4 100644 --- a/src/index/vocabulary/VocabularyType.h +++ b/src/index/vocabulary/VocabularyType.h @@ -32,11 +32,14 @@ class VocabularyType { absl::StrCat("\"", description, "\" is not a valid vocabulary type. The currently " "supported vocabulary types are ", - absl::StrJoin(descriptions, ", "))}; - ; + getListOfSupportedValues())}; } return VocabularyType{static_cast(it - descriptions.begin())}; } + + static std::string getListOfSupportedValues() { + return absl::StrJoin(descriptions, ", "); + } std::string_view toString() const { return descriptions.at(static_cast(value_)); }