mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
Fix filed selector in extrators
This commit is contained in:
parent
56c7c5d5f0
commit
fe5d50969a
@ -174,19 +174,16 @@ pub mod perm_json_p {
|
|||||||
}) {
|
}) {
|
||||||
Selection::Skip
|
Selection::Skip
|
||||||
} else if let Some(selectors) = selectors {
|
} else if let Some(selectors) = selectors {
|
||||||
selectors
|
let mut selection = Selection::Skip;
|
||||||
.iter()
|
for selector in selectors {
|
||||||
.filter_map(|selector| {
|
if contained_in(field_name, selector) {
|
||||||
if contained_in(field_name, selector) {
|
selection = Selection::Select;
|
||||||
Some(Selection::Select)
|
break;
|
||||||
} else if contained_in(selector, field_name) {
|
} else if contained_in(selector, field_name) {
|
||||||
Some(Selection::Parent)
|
selection = Selection::Parent;
|
||||||
} else {
|
}
|
||||||
None
|
}
|
||||||
}
|
selection
|
||||||
})
|
|
||||||
.next()
|
|
||||||
.unwrap_or(Selection::Skip)
|
|
||||||
} else {
|
} else {
|
||||||
Selection::Select
|
Selection::Select
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user