mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
fix the limit
There was no check on the limit and thus, if a user especified a very large number this line could causes a panic
This commit is contained in:
parent
5b6adc6d96
commit
3d90b03d7b
@ -162,7 +162,7 @@ impl<'a> Search<'a> {
|
|||||||
let mut offset = self.offset;
|
let mut offset = self.offset;
|
||||||
let mut initial_candidates = RoaringBitmap::new();
|
let mut initial_candidates = RoaringBitmap::new();
|
||||||
let mut excluded_candidates = RoaringBitmap::new();
|
let mut excluded_candidates = RoaringBitmap::new();
|
||||||
let mut documents_ids = Vec::with_capacity(self.limit);
|
let mut documents_ids = Vec::new();
|
||||||
|
|
||||||
while let Some(FinalResult { candidates, bucket_candidates, .. }) =
|
while let Some(FinalResult { candidates, bucket_candidates, .. }) =
|
||||||
criteria.next(&excluded_candidates)?
|
criteria.next(&excluded_candidates)?
|
||||||
|
Loading…
Reference in New Issue
Block a user