Skip to content

Commit 89d3e2f

Browse files
committed
enable missing property for elastic sort
1 parent e8bae47 commit 89d3e2f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/elastic/src/entities/elastic.query.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ function buildElasticIndexerSort(sorts: ElasticSortProperty[]): any[] {
1818
return [];
1919
}
2020

21-
return sorts.map((sortProp: ElasticSortProperty) => ({ [sortProp.name]: { order: sortProp.order } }));
21+
return sorts.map((sortProp: ElasticSortProperty) => ({
22+
[sortProp.name]: {
23+
order: sortProp.order,
24+
...(sortProp.missing !== undefined && { missing: sortProp.missing })
25+
}
26+
}));
2227
}
2328

2429
export class ElasticQuery {

0 commit comments

Comments
 (0)