[Logs UI] Correctly filter for log rate anomaly examples with missing dataset (#76775)
This fixes #76493 by querying for the "unknown" (i.e. empty) dataset using an exists clause. This should be in line with how ML anomaly detection treats missing partition values.
This commit is contained in:
parent
311805a57d
commit
e0aeebc149
|
@ -33,7 +33,7 @@ export const createLogEntryExamplesQuery = (
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...(!!dataset
|
...(dataset !== ''
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
term: {
|
term: {
|
||||||
|
@ -41,7 +41,19 @@ export const createLogEntryExamplesQuery = (
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: [
|
||||||
|
{
|
||||||
|
bool: {
|
||||||
|
must_not: [
|
||||||
|
{
|
||||||
|
exists: {
|
||||||
|
field: partitionField,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]),
|
||||||
...(categoryQuery
|
...(categoryQuery
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue