Merged
Conversation
| /// | ||
| /// The provided buffer must come from `HitSet::into_buffer` | ||
| pub fn from_buffer(buffer: OwnedBytes) -> Self { | ||
| let mut this = Self { |
Collaborator
There was a problem hiding this comment.
Since you went for a posting list format (as opposed to a bit set for instance), it might be nice to reuse tantivy's format and make this a TermScorer. It would add the skip list and might enable some dynamic performance optimization.
(can be done later and requires code in tantivy)
Contributor
Author
There was a problem hiding this comment.
i started with a naive bitset, but moved to a posting list for compactness. There didn't seem to be enough public code in tantivy to use its posting list format from the outside, but i agree with the idea
fulmicoton-dd
approved these changes
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a predicate cache which can store the list of documents matching a (sub-)query.
This can be useful when multiple requests share the same fragment of query or the same query with other part of the request being distinct (search after, successive aggregation on the same set of document...)
at the moment we only insert these nodes to speed up search_after, ideally we would let people suggest in their query what might be replayed a bunch (the top level of a query that's going to use pagination, or a part of a query added systematically for access control by some middleware), or detect automatically good candidates for being cached.