Skip to content

Commit

Permalink
added option to allow missing values in range queries
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Jul 10, 2023
1 parent 86f53b2 commit 07fa998
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions searchlib/lib/search/query/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ export function getDateRangeFilter(filter, filterConfig) {
return;
}

if (filterConfig.allow_missing) {
res.bool.should.push({
bool: { must_not: { exists: { field: filter.field } } },
});
}
return res;
}

Expand Down

0 comments on commit 07fa998

Please sign in to comment.