diff options
Diffstat (limited to 'icing/index/iterator/section-restrict-data.h')
-rw-r--r-- | icing/index/iterator/section-restrict-data.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/icing/index/iterator/section-restrict-data.h b/icing/index/iterator/section-restrict-data.h index 26ca597..64d5087 100644 --- a/icing/index/iterator/section-restrict-data.h +++ b/icing/index/iterator/section-restrict-data.h @@ -23,6 +23,7 @@ #include "icing/schema/schema-store.h" #include "icing/schema/section.h" +#include "icing/store/document-id.h" #include "icing/store/document-store.h" namespace icing { @@ -48,10 +49,21 @@ class SectionRestrictData { // Returns: // - If type_property_filters_ has an entry for the given schema type or // wildcard(*), return a bitwise or of section IDs in the schema type - // that that are also present in the relevant filter list. + // that are also present in the relevant filter list. // - Otherwise, return kSectionIdMaskAll. SectionIdMask ComputeAllowedSectionsMask(const std::string& schema_type); + // Calculates the section mask of allowed sections(determined by the + // property filters map) for the given document id, by retrieving its schema + // type name and calling the above method. + // + // Returns: + // - If type_property_filters_ has an entry for the given document's schema + // type or wildcard(*), return a bitwise or of section IDs in the schema + // type that are also present in the relevant filter list. + // - Otherwise, return kSectionIdMaskAll. + SectionIdMask ComputeAllowedSectionsMask(DocumentId document_id); + const DocumentStore& document_store() const { return document_store_; } const SchemaStore& schema_store() const { return schema_store_; } |