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 'postings-refactor' into postings-refactor-integration

Kishore Nallane42acc430704
diff --cc src/index.cpp
index 5d6295ba,8f5e2bf6..09f1b381
--- a/src/index.cpp
+++ b/src/index.cpp
@@@ -1197,10 -1225,12 +1223,12 @@@ uint32_t Index::do_filtering(uint32_t*
continue;
}
- query_suggestion.push_back(leaf);
+ posting_lists.push_back(leaf->values);
}
- if(posting_lists.size() != str_tokens.size()) {
+ // For NOT_EQUALS alone, it is okay for none of the results to match prior to negation
+ // e.g. field:- [RANDOM_NON_EXISTING_STRING]
- if(a_filter.comparators[0] != NOT_EQUALS && query_suggestion.size() != str_tokens.size()) {
++ if(a_filter.comparators[0] != NOT_EQUALS && posting_lists.size() != str_tokens.size()) {
continue;
}