Skip to content

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

Fix command line usage: data-dir and api-key are required.

kishorenc6463663f81bf
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc82f88e..e48ae527 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,7 +126,7 @@ if (APPLE)
set(STD_LIB -static-libstdc++) # https://stackoverflow.com/a/26543140/131050 (can't statically link libgcc on Mac)
FIND_PACKAGE(ngHTTP2 REQUIRED)
- set(CURL_LIBRARIES ldap ${NGHTTP2_LIBRARIES} ${CURL_LIBRARIES}) # ldap and nghttp2 were not being statically built
+ set(CURL_LIBRARIES ${NGHTTP2_LIBRARIES} ${CURL_LIBRARIES}) # nghttp2 was not being statically built
else()
set(STD_LIB -static-libgcc -static-libstdc++)
endif()
diff --git a/src/typesense_server_utils.cpp b/src/typesense_server_utils.cpp
index fd6dc85e..e947be90 100644
--- a/src/typesense_server_utils.cpp
+++ b/src/typesense_server_utils.cpp
@@ -18,8 +18,8 @@ bool directory_exists(const std::string & dir_path) {
void init_cmdline_options(cmdline::parser & options, int argc, char **argv) {
options.set_program_name("./typesense-server");
- options.add<std::string>("data-dir", 'd', "Directory where data will be stored.", false);
- options.add<std::string>("api-key", 'a', "API key that allows all operations.", false);
+ options.add<std::string>("data-dir", 'd', "Directory where data will be stored.", true);
+ options.add<std::string>("api-key", 'a', "API key that allows all operations.", true);
options.add<std::string>("search-only-api-key", 's', "API key that allows only searches.", false);
options.add<std::string>("listen-address", 'h', "Address to which Typesense server binds.", false, "0.0.0.0");