diff options
Diffstat (limited to 'indexer/search_index_builder.cpp')
-rw-r--r-- | indexer/search_index_builder.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indexer/search_index_builder.cpp b/indexer/search_index_builder.cpp index 4068d62d75..f1bfccc649 100644 --- a/indexer/search_index_builder.cpp +++ b/indexer/search_index_builder.cpp @@ -295,7 +295,7 @@ void indexer::BuildSearchIndex(FeaturesVector const & featuresV, Writer & writer FileWriter::DeleteFileX(tmpFilePath); } -bool indexer::BuildSearchIndexFromDatFile(string const & fName) +bool indexer::BuildSearchIndexFromDatFile(string const & fName, bool forceRebuild) { LOG(LINFO, ("Start building search index. Bits = ", search::POINT_CODING_BITS)); @@ -308,6 +308,9 @@ bool indexer::BuildSearchIndexFromDatFile(string const & fName) { FilesContainerR readCont(datFile); + if (!forceRebuild && readCont.IsReaderExist(SEARCH_INDEX_FILE_TAG)) + return true; + feature::DataHeader header; header.Load(readCont.GetReader(HEADER_FILE_TAG)); |