mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-04 19:56:30 +00:00
Update crates/milli/src/search/facet/filter.rs
This commit is contained in:
@ -433,8 +433,9 @@ impl<'a> Filter<'a> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if *last == 255 {
|
if *last == u8::MAX {
|
||||||
// The prefix is invalid utf8, so no documents will match anyway
|
// u8::MAX is a forbidden UTF-8 byte, we're guaranteed it cannot be sent through a filter to meilisearch, but just in case, we're going to return something
|
||||||
|
tracing::warn!("Found non utf-8 character in filter. That shouldn't be possible");
|
||||||
return Ok(RoaringBitmap::new());
|
return Ok(RoaringBitmap::new());
|
||||||
}
|
}
|
||||||
*last += 1;
|
*last += 1;
|
||||||
|
Reference in New Issue
Block a user