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
Don't accept empty nodes file.
Kishore Nallanbf8a2fc6e515
diff --git a/src/tsconfig.cpp b/src/tsconfig.cppindex 150c7ce0..08185546 100644--- a/src/tsconfig.cpp+++ b/src/tsconfig.cpp@@ -98,6 +98,10 @@ Option<std::string> Config::fetch_file_contents(const std::string & file_path) {std::string content((std::istreambuf_iterator<char>(infile)), (std::istreambuf_iterator<char>()));infile.close();+ if(content.empty()) {+ return Option<std::string>(400, std::string("Empty file at: ") + file_path);+ }+return Option<std::string>(content);}diff --git a/src/typesense_server_utils.cpp b/src/typesense_server_utils.cppindex 2c664d68..5f970d5c 100644--- a/src/typesense_server_utils.cpp+++ b/src/typesense_server_utils.cpp@@ -245,7 +245,7 @@ int start_raft_server(ReplicationState& replication_state, const std::string& stif(!nodes_config_op.ok()) {LOG(ERROR) << nodes_config_op.error();- exit(-1);+ return -1;}butil::ip_t peering_ip;