diff options
author | Paul Masurel <paul.masurel@gmail.com> | 2017-06-14 10:46:06 +0900 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2017-06-14 10:46:06 +0900 |
commit | 93e7f28cc085827d65e28ce00a1240a60273753e (patch) | |
tree | a8e4b8ce378fac974283df6c938d25a105db4ee5 /src/fastfield/reader.rs | |
parent | 8875b9794acddd19e828a981ec99bb27e0b57a0d (diff) |
Added unit test
Diffstat (limited to 'src/fastfield/reader.rs')
-rw-r--r-- | src/fastfield/reader.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fastfield/reader.rs b/src/fastfield/reader.rs index 8413527..aae1dd7 100644 --- a/src/fastfield/reader.rs +++ b/src/fastfield/reader.rs @@ -28,8 +28,21 @@ pub trait FastFieldReader: Sized { /// Return the value associated to the given document. /// /// This accessor should return as fast as possible. + /// + /// # Panics + /// + /// May panic if `doc` is greater than the segment + // `maxdoc`. fn get(&self, doc: DocId) -> Self::ValueType; + /// Fills an output buffer with the fast field values + /// associated with the `DocId` going from + /// `start` to `start + output.len()`. + /// + /// # Panics + /// + /// May panic if `start + output.len()` is greater than + /// the segment's `maxdoc`. fn get_range(&self, start: u32, output: &mut [Self::ValueType]); /// Opens a fast field given a source. |