aboutsummaryrefslogtreecommitdiff
path: root/icing/index/main/main-index.h
diff options
context:
space:
mode:
Diffstat (limited to 'icing/index/main/main-index.h')
-rw-r--r--icing/index/main/main-index.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/icing/index/main/main-index.h b/icing/index/main/main-index.h
index e181330..9e570d5 100644
--- a/icing/index/main/main-index.h
+++ b/icing/index/main/main-index.h
@@ -48,6 +48,16 @@ class MainIndex {
const std::string& index_directory, const Filesystem* filesystem,
const IcingFilesystem* icing_filesystem);
+ // Reads magic from existing flash index storage file header. We need this
+ // during Icing initialization phase to determine the version.
+ //
+ // RETURNS:
+ // - On success, a valid magic.
+ // - NOT_FOUND if the flash index doesn't exist.
+ // - INTERNAL on I/O error.
+ static libtextclassifier3::StatusOr<int> ReadFlashIndexMagic(
+ const Filesystem* filesystem, const std::string& index_directory);
+
// Get a PostingListHitAccessor that holds the posting list chain for 'term'.
//
// RETURNS: