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
Merge branch 'main' into v27
Kishore Nallan3d4ad20bba2f
diff --cc include/collection.hindex 353cf9c3,73604669..32c5e50f--- a/include/collection.h+++ b/include/collection.h@@@ -585,10 -585,7 +585,10 @@@ publicconst std::string& override_tags_str = "",const std::string& voice_query = "",bool enable_typos_for_numerical_tokens = true,+ bool enable_synonyms = true,+ bool synonym_prefix = false,+ uint32_t synonym_num_typos = 0,- bool enable_lazy_filter = true) const;+ bool enable_lazy_filter = false) const;Option<bool> get_filter_ids(const std::string & filter_query, filter_result_t& filter_result) const;diff --cc include/index.hindex 8e917065,1bffb855..17793bfc--- a/include/index.h+++ b/include/index.h@@@ -694,10 -693,7 +694,10 @@@ publicconst drop_tokens_param_t drop_tokens_mode,facet_index_type_t facet_index_type = DETECT,bool enable_typos_for_numerical_tokens = true,+ bool enable_synonyms = true,+ bool synonym_prefix = false,+ uint32_t synonym_num_typos = 0,- bool enable_lazy_filter = true+ bool enable_lazy_filter = false) const;void remove_field(uint32_t seq_id, const nlohmann::json& document, const std::string& field_name,diff --cc include/tsconfig.hindex f24776bc,b879873b..59d059e5--- a/include/tsconfig.h+++ b/include/tsconfig.h@@@ -76,10 -76,10 +76,12 @@@ privateuint32_t db_compaction_interval;+ bool enable_lazy_filter;+bool enable_search_logging;+ uint16_t filter_by_max_ops;+protected:Config() {@@@ -110,9 -110,9 +112,11 @@@this->housekeeping_interval = 1800; // in secondsthis->db_compaction_interval = 0; // in seconds, disabled+ this->enable_lazy_filter = false;+this->enable_search_logging = false;++ this->filter_by_max_ops = FILTER_BY_DEFAULT_OPERATIONS;}Config(Config const&) {diff --cc src/tsconfig.cppindex 99b56ff1,d1967ac0..5f6ddc8a--- a/src/tsconfig.cpp+++ b/src/tsconfig.cpp@@@ -250,11 -250,8 +250,12 @@@ void Config::load_config_env()this->memory_used_max_percentage = std::stoi(get_env("TYPESENSE_MEMORY_USED_MAX_PERCENTAGE"));}+ if(!get_env("TYPESENSE_FILTER_BY_MAX_OPS").empty()) {+ this->filter_by_max_ops = std::stoi(get_env("TYPESENSE_FILTER_BY_MAX_OPS"));+ }+this->skip_writes = ("TRUE" == get_env("TYPESENSE_SKIP_WRITES"));+ this->enable_lazy_filter = ("TRUE" == get_env("TYPESENSE_ENABLE_LAZY_FILTER"));this->reset_peers_on_error = ("TRUE" == get_env("TYPESENSE_RESET_PEERS_ON_ERROR"));}diff --cc src/typesense_server_utils.cppindex 99f1c20c,c0379461..5395dedb--- a/src/typesense_server_utils.cpp+++ b/src/typesense_server_utils.cpp@@@ -112,8 -112,8 +112,9 @@@ void init_cmdline_options(cmdline::parsoptions.add<int>("cache-num-entries", '\0', "Number of entries to cache.", false, 1000);options.add<uint32_t>("analytics-flush-interval", '\0', "Frequency of persisting analytics data to disk (in seconds).", false, 3600);options.add<uint32_t>("housekeeping-interval", '\0', "Frequency of housekeeping background job (in seconds).", false, 1800);+ options.add<bool>("enable-lazy-filter", '\0', "Filter clause will be evaluated lazily.", false, false);options.add<uint32_t>("db-compaction-interval", '\0', "Frequency of RocksDB compaction (in seconds).", false, 604800);+ options.add<uint16_t>("filter-by-max-ops", '\0', "Maximum number of operations permitted in filtery_by.", false, Config::FILTER_BY_DEFAULT_OPERATIONS);// DEPRECATEDoptions.add<std::string>("listen-address", 'h', "[DEPRECATED: use `api-address`] Address to which Typesense API service binds.", false, "0.0.0.0");