Fix the binaries that use the new optional filters

This commit is contained in:
Clément Renault 2021-12-09 11:50:12 +01:00
parent 25faef67d0
commit 1c6c89f345
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 4 additions and 3 deletions

View File

@ -250,9 +250,10 @@ impl Search {
} }
if let Some(ref filter) = self.filter { if let Some(ref filter) = self.filter {
let condition = milli::Filter::from_str(filter)?; if let Some(condition) = milli::Filter::from_str(filter)? {
search.filter(condition); search.filter(condition);
} }
}
if let Some(offset) = self.offset { if let Some(offset) = self.offset {
search.offset(offset); search.offset(offset);

View File

@ -738,7 +738,7 @@ async fn main() -> anyhow::Result<()> {
let filters = match query.filters.as_ref() { let filters = match query.filters.as_ref() {
Some(condition) if !condition.trim().is_empty() => { Some(condition) if !condition.trim().is_empty() => {
Some(MilliFilter::from_str(condition).unwrap()) MilliFilter::from_str(condition).unwrap()
} }
_otherwise => None, _otherwise => None,
}; };