mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Do not try to parse empty faceted strings
This commit is contained in:
parent
23f9a22edc
commit
f9cc12ae0f
@ -586,9 +586,11 @@ fn parse_facet_value(ftype: FacetType, value: &Value) -> anyhow::Result<SmallVec
|
||||
},
|
||||
},
|
||||
Value::String(string) => {
|
||||
let string = string.trim();
|
||||
if string.is_empty() { return Ok(()) }
|
||||
match ftype {
|
||||
FacetType::String => {
|
||||
let string = SmallString32::from(string.as_str());
|
||||
let string = SmallString32::from(string);
|
||||
Ok(output.push(String(string)))
|
||||
},
|
||||
FacetType::Float => match string.parse() {
|
||||
|
Loading…
Reference in New Issue
Block a user