Skip to content

Commit

Permalink
add nested fields param mapping findings index for doc level queries (o…
Browse files Browse the repository at this point in the history
…pensearch-project#1276)

Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Oct 24, 2023
1 parent ca9b75c commit 2146199
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dynamic": "strict",
"_meta" : {
"schema_version": 3
"schema_version": 4
},
"properties": {
"schema_version": {
Expand Down Expand Up @@ -46,6 +46,9 @@
"type" : "keyword"
}
}
},
"fields": {
"type": "text"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AlertIndicesIT : AlertingRestTestCase() {

putFindingMappings(
AlertIndices.findingMapping().trimStart('{').trimEnd('}')
.replace("\"schema_version\": 3", "\"schema_version\": 0")
.replace("\"schema_version\": 4", "\"schema_version\": 0")
)
assertIndexExists(AlertIndices.FINDING_HISTORY_WRITE_INDEX)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 0)
Expand All @@ -89,7 +89,7 @@ class AlertIndicesIT : AlertingRestTestCase() {
executeMonitor(trueMonitor.id)
assertIndexExists(AlertIndices.FINDING_HISTORY_WRITE_INDEX)
verifyIndexSchemaVersion(ScheduledJob.SCHEDULED_JOBS_INDEX, 8)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 3)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 4)
}

fun `test alert index gets recreated automatically if deleted`() {
Expand Down

0 comments on commit 2146199

Please sign in to comment.