mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Do not try to parse empty faceted strings
This commit is contained in:
parent
23f9a22edc
commit
f9cc12ae0f
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue