Skip to content

Commit 0b8f826

Browse files
[Security Solution] Fix sorting on unmapped fields in Timeline Events table
1 parent e8ecbc7 commit 0b8f826

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

x-pack/plugins/security_solution/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ export const buildTimelineEventsAllQuery = ({
4949
const getSortField = (sortFields: SortField[]) =>
5050
sortFields.map((item) => {
5151
const field: string = item.field === 'timestamp' ? '@timestamp' : item.field;
52-
return { [field]: item.direction };
52+
return {
53+
[field]: {
54+
order: item.direction,
55+
unmapped_type: 'text',
56+
},
57+
};
5358
});
5459

5560
const dslQuery = {

0 commit comments

Comments
 (0)