Skip to content

Commit

Permalink
Fix master test failures (elastic#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaiera authored Jan 28, 2020
1 parent ab63cc6 commit e14c100
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,16 @@ class AbstractScalaEsScalaSpark(prefix: String, readMetadata: jl.Boolean) extend
val typename = "alias"
val target = resource(index, typename, version)

val indexPattern = "spark-template-*"
val patternMatchField = if (version.onOrAfter(EsMajorVersion.V_8_X)) {
s""""index_patterns":["$indexPattern"],"""
} else {
s""""template": "$indexPattern","""
}

val template = s"""
|{
|"template" : "spark-template-*",
|$patternMatchField
|"settings" : {
| "number_of_shards" : 1,
| "number_of_replicas" : 0
Expand Down

0 comments on commit e14c100

Please sign in to comment.