diff options
Diffstat (limited to 'icing/query/query-processor.cc')
-rw-r--r-- | icing/query/query-processor.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/icing/query/query-processor.cc b/icing/query/query-processor.cc index 3e43ad9..bbfbf3c 100644 --- a/icing/query/query-processor.cc +++ b/icing/query/query-processor.cc @@ -176,12 +176,11 @@ libtextclassifier3::StatusOr<QueryResults> QueryProcessor::ParseSearch( results.root_iterator = std::make_unique<DocHitInfoIteratorFilter>( std::move(results.root_iterator), &document_store_, &schema_store_, options, current_time_ms); - // TODO(b/294114230): Move this SectionRestrict filter from root level to - // lower levels if that would improve performance. if (!search_spec.type_property_filters().empty()) { - results.root_iterator = std::make_unique<DocHitInfoIteratorSectionRestrict>( - std::move(results.root_iterator), &document_store_, &schema_store_, - search_spec, current_time_ms); + results.root_iterator = + DocHitInfoIteratorSectionRestrict::ApplyRestrictions( + std::move(results.root_iterator), &document_store_, &schema_store_, + search_spec, current_time_ms); } return results; } @@ -406,7 +405,7 @@ libtextclassifier3::StatusOr<QueryResults> QueryProcessor::ParseRawQuery( // the section restrict std::set<std::string> section_restricts; section_restricts.insert(std::move(frames.top().section_restrict)); - result_iterator = std::make_unique<DocHitInfoIteratorSectionRestrict>( + result_iterator = DocHitInfoIteratorSectionRestrict::ApplyRestrictions( std::move(result_iterator), &document_store_, &schema_store_, std::move(section_restricts), current_time_ms); |