Skip to content

Commit

Permalink
Fix more sorts by adding unmapped_type (#85837) (#86666)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
chrisronline and kibanamachine authored Dec 21, 2020
1 parent aa28c41 commit 7c7dc5f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export async function fetchESUsage(
{
timestamp: {
order: 'desc',
unmapped_type: 'long',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export async function fetchLicenseType(
{
timestamp: {
order: 'desc',
unmapped_type: 'long',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('fetchLegacyAlerts', () => {
],
body: {
size,
sort: [{ timestamp: { order: 'desc' } }],
sort: [{ timestamp: { order: 'desc', unmapped_type: 'long' } }],
query: {
bool: {
minimum_should_match: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export async function fetchLegacyAlerts(
{
timestamp: {
order: 'desc',
unmapped_type: 'long',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export async function fetchMissingMonitoringData(
{
timestamp: {
order: 'desc',
unmapped_type: 'long',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/monitoring/server/lib/beats/get_beats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export async function getBeats(req: LegacyRequest, beatsIndexPattern: string, cl
inner_hits: {
name: 'earliest',
size: 1,
sort: [{ 'beats_stats.timestamp': 'asc' }],
sort: [{ 'beats_stats.timestamp': { order: 'asc', unmapped_type: 'long' } }],
},
},
sort: [
Expand Down

0 comments on commit 7c7dc5f

Please sign in to comment.