diff options
author | Tim Barron <tjbarron@google.com> | 2023-03-14 09:57:47 -0700 |
---|---|---|
committer | Tim Barron <tjbarron@google.com> | 2023-03-14 09:57:47 -0700 |
commit | c1e7edff54723138756063ee4b7948c1ee91277e (patch) | |
tree | b2a55e543a6c9396631feaab459bfd671a8bc400 /icing/index/numeric/posting-list-integer-index-serializer.h | |
parent | 140aaee3e7b269f02599310e42d6172090ce02d2 (diff) | |
parent | d5c81ae0c41ae9c1aefb3601f3836570b9f686c7 (diff) | |
download | icing-c1e7edff54723138756063ee4b7948c1ee91277e.tar.gz |
Merge remote-tracking branch 'goog/upstream-master' into androidx-platform-dev
* goog/upstream-master:
Update Icing from upstream.
Update Icing from upstream.
Descriptions:
========================================================================
Cache an instance of UBreakIterator to reduce unnecessary creations.
========================================================================
Cap number of individual IntegerIndexStorages that IntegerIndex creates.
========================================================================
Change error in trimRightMostNode from Unimplemented to InvalidArgument.
========================================================================
Add detection for new language features of List Filters Query Language.
========================================================================
Add option to control threshold to rebuild index during optimize by flag
========================================================================
Add option to control use of namespace id to build urimapper by flag.
========================================================================
Enforce schema validation for joinable config.
========================================================================
Adopt bucket splitting for IntegerIndexStorage.
========================================================================
Implement bucket splitting function.
========================================================================
Add Icing initialization unit tests for QualifiedIdTypeJoinableIndex.
========================================================================
Add Icing schema change unit tests for QualifiedIdTypeJoinableIndex.
========================================================================
Add Icing optimization unit tests for QualifiedIdTypeJoinableIndex.
========================================================================
Integrate QualifiedIdTypeJoinableIndex into IcingSearchEngine.
========================================================================
Implement QualifiedIdJoinablePropertyIndexingHandler.
========================================================================
Change QualifiedIdTypeJoinableIndex to store raw qualified id string.
========================================================================
Pass info about unnormalized query terms through lexer/parser/visitor.
========================================================================
Integrate Advanced Query w/ Suggest, make ADVANCED_QUERY default parser.
======================================================================
Bug: 208654892
Bug: 263890397
Bug: 259743562
Bug: 272145329
Bug: 227356108
Change-Id: I44de5853bb6c55b42800ae34d8071016be6c87cd
Diffstat (limited to 'icing/index/numeric/posting-list-integer-index-serializer.h')
-rw-r--r-- | icing/index/numeric/posting-list-integer-index-serializer.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/icing/index/numeric/posting-list-integer-index-serializer.h b/icing/index/numeric/posting-list-integer-index-serializer.h index 9cfdb7a..ea2f2da 100644 --- a/icing/index/numeric/posting-list-integer-index-serializer.h +++ b/icing/index/numeric/posting-list-integer-index-serializer.h @@ -111,6 +111,12 @@ class PostingListIntegerIndexSerializer : public PostingListSerializer { libtextclassifier3::Status PopFrontData(PostingListUsed* posting_list_used, uint32_t num_data) const; + // Helper function to determine if posting list is full. + bool IsFull(const PostingListUsed* posting_list_used) const { + return GetSpecialData(posting_list_used, /*index=*/0).data().is_valid() && + GetSpecialData(posting_list_used, /*index=*/1).data().is_valid(); + } + private: // Posting list layout formats: // @@ -228,11 +234,6 @@ class PostingListIntegerIndexSerializer : public PostingListSerializer { // +-----------------+-----------------+---+--------+-----+--------+--------+ // Helpers to determine what state the posting list is in. - bool IsFull(const PostingListUsed* posting_list_used) const { - return GetSpecialData(posting_list_used, /*index=*/0).data().is_valid() && - GetSpecialData(posting_list_used, /*index=*/1).data().is_valid(); - } - bool IsAlmostFull(const PostingListUsed* posting_list_used) const { return !GetSpecialData(posting_list_used, /*index=*/0).data().is_valid() && GetSpecialData(posting_list_used, /*index=*/1).data().is_valid(); |