-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support versionType parameter in reindex request
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...4s-core/src/test/scala/com/sksamuel/elastic4s/requests/reindex/ReindexBuilderFnTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.sksamuel.elastic4s.requests.reindex | ||
|
||
import com.sksamuel.elastic4s.handlers.reindex.ReindexBuilderFn | ||
import com.sksamuel.elastic4s.requests.common.VersionType.ExternalGte | ||
import org.scalatest.funsuite.AnyFunSuite | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class ReindexBuilderFnTest extends AnyFunSuite with Matchers { | ||
import com.sksamuel.elastic4s.ElasticApi._ | ||
|
||
test("reindex content builder should support version type") { | ||
val req = reindex("source", "target").versionType(ExternalGte) | ||
|
||
ReindexBuilderFn(req).string shouldBe | ||
"""{"source":{"index":["source"]},"dest":{"index":"target","version_type":"external_gte"}}""".stripMargin | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters