diff options
Diffstat (limited to 'icing/index/index-processor_benchmark.cc')
-rw-r--r-- | icing/index/index-processor_benchmark.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/icing/index/index-processor_benchmark.cc b/icing/index/index-processor_benchmark.cc index 8766f0b..8f5e319 100644 --- a/icing/index/index-processor_benchmark.cc +++ b/icing/index/index-processor_benchmark.cc @@ -12,13 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include <cstdint> +#include <limits> #include <memory> +#include <string> #include <utility> #include <vector> #include "icing/text_classifier/lib3/utils/base/statusor.h" #include "testing/base/public/benchmark.h" #include "gmock/gmock.h" +#include "third_party/absl/flags/flag.h" #include "icing/document-builder.h" #include "icing/file/filesystem.h" #include "icing/index/data-indexing-handler.h" @@ -27,11 +31,11 @@ #include "icing/index/integer-section-indexing-handler.h" #include "icing/index/numeric/integer-index.h" #include "icing/index/numeric/numeric-index.h" -#include "icing/index/string-section-indexing-handler.h" +#include "icing/index/term-indexing-handler.h" #include "icing/legacy/core/icing-string-util.h" +#include "icing/legacy/index/icing-filesystem.h" #include "icing/schema/schema-store.h" -#include "icing/schema/schema-util.h" -#include "icing/schema/section-manager.h" +#include "icing/store/document-id.h" #include "icing/testing/common-matchers.h" #include "icing/testing/icu-data-file-helper.h" #include "icing/testing/test-data.h" @@ -40,7 +44,9 @@ #include "icing/tokenization/language-segmenter.h" #include "icing/transform/normalizer-factory.h" #include "icing/transform/normalizer.h" +#include "icing/util/clock.h" #include "icing/util/logging.h" +#include "icing/util/status-macros.h" #include "icing/util/tokenized-document.h" #include "unicode/uloc.h" @@ -189,16 +195,17 @@ libtextclassifier3::StatusOr<std::vector<std::unique_ptr<DataIndexingHandler>>> CreateDataIndexingHandlers(const Clock* clock, const Normalizer* normalizer, Index* index, NumericIndex<int64_t>* integer_index) { ICING_ASSIGN_OR_RETURN( - std::unique_ptr<StringSectionIndexingHandler> - string_section_indexing_handler, - StringSectionIndexingHandler::Create(clock, normalizer, index)); + std::unique_ptr<TermIndexingHandler> term_indexing_handler, + TermIndexingHandler::Create( + clock, normalizer, index, + /*build_property_existence_metadata_hits=*/true)); ICING_ASSIGN_OR_RETURN( std::unique_ptr<IntegerSectionIndexingHandler> integer_section_indexing_handler, IntegerSectionIndexingHandler::Create(clock, integer_index)); std::vector<std::unique_ptr<DataIndexingHandler>> handlers; - handlers.push_back(std::move(string_section_indexing_handler)); + handlers.push_back(std::move(term_indexing_handler)); handlers.push_back(std::move(integer_section_indexing_handler)); return handlers; } |