Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Fixed failing test.
Kishore Nallane22297e249fb
diff --git a/include/index.h b/include/index.hindex 9c2c1113..13aa537e 100644--- a/include/index.h+++ b/include/index.h@@ -101,7 +101,7 @@ struct index_record {Option<bool> indexed; // indicates if the indexing operation was a successindex_record(size_t record_pos, uint32_t seq_id, const nlohmann::json& doc, index_operation_t operation):- position(record_pos), seq_id(seq_id), doc(doc), operation(operation), indexed(false) {+ position(record_pos), seq_id(seq_id), doc(doc), operation(operation), is_update(false), indexed(false) {}diff --git a/src/collection_manager.cpp b/src/collection_manager.cppindex ce9e8ea1..59ee29dc 100644--- a/src/collection_manager.cpp+++ b/src/collection_manager.cpp@@ -195,7 +195,7 @@ Option<bool> CollectionManager::load(const size_t init_batch_size) {if(num_indexed != num_records) {const Option<std::string> & index_error_op = get_first_index_error(iter_batch[i]);- if(index_error_op.ok()) {+ if(!index_error_op.ok()) {return Option<bool>(false, index_error_op.get());}}diff --git a/test/collection_manager_test.cpp b/test/collection_manager_test.cppindex 63fbea4e..da84b0d5 100644--- a/test/collection_manager_test.cpp+++ b/test/collection_manager_test.cpp@@ -213,7 +213,13 @@ TEST_F(CollectionManagerTest, RestoreRecordsOnRestart) {// create a new collection manager to ensure that it restores the records from the disk backed storeCollectionManager & collectionManager2 = CollectionManager::get_instance();collectionManager2.init(store, 1.0, "auth_key");- collectionManager2.load();+ auto load_op = collectionManager2.load();++ if(!load_op.ok()) {+ LOG(ERROR) << load_op.error();+ }++ ASSERT_TRUE(load_op.ok());collection1 = collectionManager2.get_collection("collection1");ASSERT_NE(nullptr, collection1);