Skip to content

Commit

Permalink
if the range is empty, don't add it to the query
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Feb 9, 2023
1 parent e0d1704 commit 1bc2c7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions searchlib/lib/search/query/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ export function getDateRangeFilter(filter, filterConfig) {
},
};

if (res.bool[op][0].range[filter.field].to === undefined){
return;
}

return res;
}

Expand Down

0 comments on commit 1bc2c7d

Please sign in to comment.