[MOD-11174] Port NewInvIndIterator_NumericFull to Rust#6796
Merged
Conversation
47e98a7 to
6eb70a0
Compare
chesedo
reviewed
Sep 9, 2025
chesedo
reviewed
Sep 9, 2025
0bdd24b to
7c649f0
Compare
7c4e1d1 to
2cf02bb
Compare
2 tasks
e293e76 to
548fc17
Compare
548fc17 to
d25ff5e
Compare
2 tasks
GlenDC
suggested changes
Oct 7, 2025
d25ff5e to
7a2b27d
Compare
GlenDC
previously approved these changes
Oct 9, 2025
30a44e3 to
c101b05
Compare
c101b05 to
2f70504
Compare
Will allow us to use '?' when reading from the II which is returning a std::io::Error
f7bd0b9 to
b68fee0
Compare
chesedo
previously approved these changes
Oct 28, 2025
GuyAv46
reviewed
Oct 28, 2025
Rust re-implementation of NewInvIndIterator_NumericFull(). The tests logic have been copied from the existing C++ tests. Validation is not implemented yet.
b68fee0 to
86e1206
Compare
I had to edit a comment block in tag_index.h to workaround a nasty bug in bindgen, see rust-lang/rust-bindgen#1313 Also add simple wrappers so it can easily be used in the bencher.
Will be used to share code with the term iterator tests.
86e1206 to
dbd036b
Compare
There was a problem hiding this comment.
Bug: Trait Bound Mismatch in FilterNumericReader
The generic IndexReader implementation for FilterNumericReader uses the bound IR: IndexReader<'index>, but the constructor FilterNumericReader::new requires IR: NumericReader<'index>. This is a trait bound mismatch. The impl IndexReader block should use IR: NumericReader<'index> to match the constructor's requirements and ensure type safety, since FilterNumericReader is specifically designed to work with numeric readers only.
src/redisearch_rs/inverted_index/src/lib.rs#L1503-L1575
RediSearch/src/redisearch_rs/inverted_index/src/lib.rs
Lines 1503 to 1575 in dbd036b
GuyAv46
previously approved these changes
Oct 29, 2025
Will be used to restrict the numeric II iterator to readers producing numeric results. Also allow us to restrict the type of reader wrapper by FilterNumericReader and FilterGeoReader.
Allow the numeric iterator to be used with a numeric filter wrapper. Will also be used to implement the term iterator.
dbd036b to
9210057
Compare
GuyAv46
approved these changes
Oct 29, 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.
Rust port of
NewInvIndIterator_NumericFull. Does not include validation yet, this will be part of a follow up PR.TODO:
rqe_iterators_bencherare currently crashing but does work when linking on the debug C lib rather than the release one ?! Fixed with fix bugs regarding misalignment and missing symbols #7000Benchmark results
Rust implementation is slightly faster as the C one.
Mark if applicable
Note
Ports the NumericFull inverted index iterator to Rust, introduces numeric reader/decoder traits, and adds tests and benchmarks with necessary FFI/build updates.
rqe_iterators::inverted_indexwithFullIteratorandNumericFullproviding full-scan andskip_toover inverted indexes.RQEIteratorErrorviathiserror; extendSkipToOutcomeand iterator API.NumericDecoderandNumericReader; implement fornumeric::Numeric,IndexReaderCore, and filter readers.FilterNumericReaderandFilterGeoReaderto wrapNumericReaderand propagateNumericReaderimpls.NumericFullread/skip behavior.NumericReaderwhere applicable and mark iterator mocks asNumericReader.rqe_iterators_benchersupport for NumericFull (dense/sparse read and skip-to), including C FFI wrappers, stubs, and build script/header updates.thiserrortorqe_iterators; addtriemap_ffiandvarint_ffito bencher; update build to linkbufferand generate bindings for inverted index headers.src/tag_index.h.Written by Cursor Bugbot for commit 9210057. This will update automatically on new commits. Configure here.