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

Add `Index::rearranging_recursive_filter`.

Harpreet Sangarad958be7bb69
diff --git a/include/field.h b/include/field.h
index 37fa1936..7a90fd9d 100644
--- a/include/field.h
+++ b/include/field.h
@@ -606,6 +606,7 @@ struct filter_node_t {
bool isOperator;
filter_node_t* left = nullptr;
filter_node_t* right = nullptr;
+ filter_tree_metrics* metrics = nullptr;
filter_node_t(filter filter_exp)
: filter_exp(std::move(filter_exp)),
diff --git a/src/index.cpp b/src/index.cpp
index 0379ae43..1b20867a 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1830,7 +1830,6 @@ Option<bool> Index::rearrange_filter_tree(filter_node_t* const root,
if (root == nullptr) {
return Option(true);
}
-
if (root->isOperator) {
uint32_t l_filter_ids_length = 0;
if (root->left != nullptr) {