Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,7 @@ export const formattedSearchStrategyResponse = {
aggs: { timestamp: { max: { field: '@timestamp' } } },
},
host_ip: {
terms: {
script: { source: "doc['host.ip']", lang: 'painless' },
size: 10,
order: { timestamp: 'desc' },
},
terms: { field: 'host.ip', value_type: 'ip', size: 10, order: { timestamp: 'desc' } },
aggs: { timestamp: { max: { field: '@timestamp' } } },
},
host_mac: {
Expand Down Expand Up @@ -623,10 +619,8 @@ export const expectedDsl = {
},
host_ip: {
terms: {
script: {
source: "doc['host.ip']",
lang: 'painless',
},
field: 'host.ip',
value_type: 'ip',
size: 10,
order: {
timestamp: 'desc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ describe('#Host details search strategy helpers', () => {
},
host_ip: {
terms: {
script: {
source: "doc['host.ip']",
lang: 'painless',
},
field: 'host.ip',
value_type: 'ip',
size: 10,
order: {
timestamp: Direction.desc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,8 @@ const getTermsAggregationTypeFromField = (field: string): AggregationRequest =>
return {
host_ip: {
terms: {
script: {
// We might be able to remove this when PR is fixed in Elasticsearch: https://github.com/elastic/elasticsearch/issues/72276
// Currently we cannot use "value_type" with an aggregation when we have a mapping conflict which is why this painless script exists
// See public ticket: https://github.com/elastic/kibana/pull/78912
// See private ticket: https://github.com/elastic/security-team/issues/333
// for more details on the use cases and causes of the conflicts and why this is here.
source: "doc['host.ip']",
lang: 'painless',
},
field: 'host.ip',
value_type: 'ip',
size: 10,
order: {
timestamp: Direction.desc,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading