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

Merge branch 'v0.26-filter' into facet_index_refactor

krunal13135f3a4f20ba06
diff --cc include/index.h
index 96ef876c,01824c62..0d1e6697
--- a/include/index.h
+++ b/include/index.h
@@@ -507,12 -502,12 +507,12 @@@ private
const std::map<size_t, std::map<size_t, uint32_t>> & included_ids_map,
Topster* curated_topster, std::vector<std::vector<art_leaf*>> & searched_queries) const;
- static uint64_t facet_token_hash(const field & a_field, const std::string &token);
+ static void compute_facet_stats(facet &a_facet, const std::string& raw_value, const std::string & field_type);
- static void compute_facet_stats(facet &a_facet, uint64_t raw_value, const std::string & field_type);
+ static void compute_facet_stats(facet &a_facet, const int64_t raw_value, const std::string & field_type);
static void handle_doc_ops(const tsl::htrie_map<char, field>& search_schema,
- nlohmann::json& update_doc, const nlohmann::json& old_doc, nlohmann::json& new_doc);
+ nlohmann::json& update_doc, const nlohmann::json& old_doc);
static void get_doc_changes(const index_operation_t op, const tsl::htrie_map<char, field>& search_schema,
nlohmann::json &update_doc, const nlohmann::json &old_doc, nlohmann::json &new_doc,
@@@ -946,9 -938,10 +946,12 @@@ public
std::map<size_t, std::map<size_t, uint32_t>>& included_ids_map,
std::vector<uint32_t>& included_ids_vec,
std::unordered_set<uint32_t>& excluded_group_ids) const;
+
+ int64_t get_doc_val_from_sort_index(sort_index_iterator it, uint32_t doc_seq_id) const;
+ Option<bool> seq_ids_outside_top_k(const std::string& field_name, size_t k,
+ std::vector<uint32_t>& outside_seq_ids);
+
friend class filter_result_iterator_t;
};