Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch: Make V7 the default version #2528

Merged
merged 2 commits into from
Nov 16, 2020
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
4 changes: 2 additions & 2 deletions docs/src/main/paradox/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Java
| bufferSize | 10 | `ElasticsearchSource` retrieves messages from Elasticsearch by scroll scan. This buffer size is used as the scroll size. |
| includeDocumentVersion | false | Tell Elasticsearch to return the documents `_version` property with the search results. See [Version](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-version.html) and [Optimistic Concurrenct Control](https://www.elastic.co/guide/en/elasticsearch/guide/current/optimistic-concurrency-control.html) to know about this property. |
| scrollDuration | 5 min | `ElasticsearchSource` retrieves messages from Elasticsearch by scroll scan. This parameter is used as a scroll value. See [Time units](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units) for supported units. |
| apiVersion | V5 | Currently supports `V5` and `V7` (see below) |
| apiVersion | V7 | Currently supports `V5` and `V7` (see below) |

### Sink and flow configuration

Expand All @@ -140,7 +140,7 @@ Java
| bufferSize | 10 | Flow and Sink batch messages to bulk requests when back-pressure applies. |
| versionType | None | If set, `ElasticsearchSink` uses the chosen versionType to index documents. See [Version types](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#_version_types) for accepted settings. |
| retryLogic | No retries | See below |
| apiVersion | V5 | Currently supports `V5` and `V7` (see below) |
| apiVersion | V7 | Currently supports `V5` and `V7` (see below) |
| allowExplicitIndex | True | When set to False, the index name will be included in the URL instead of on each document (see below) |

#### Retry logic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ object ElasticsearchSourceSettings {
10,
includeDocumentVersion = false,
FiniteDuration(5, TimeUnit.MINUTES),
ApiVersion.V5)
ApiVersion.V7)

/** Java API */
def create(connection: ElasticsearchConnectionSettings): ElasticsearchSourceSettings =
new ElasticsearchSourceSettings(connection,
10,
includeDocumentVersion = false,
FiniteDuration(5, TimeUnit.MINUTES),
ApiVersion.V5)
ApiVersion.V7)
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ object ElasticsearchWriteSettings {

/** Scala API */
def apply(connection: ElasticsearchConnectionSettings): ElasticsearchWriteSettings =
new ElasticsearchWriteSettings(connection, 10, RetryNever, None, ApiVersion.V5, allowExplicitIndex = true)
new ElasticsearchWriteSettings(connection, 10, RetryNever, None, ApiVersion.V7, allowExplicitIndex = true)

/** Java API */
def create(connection: ElasticsearchConnectionSettings): ElasticsearchWriteSettings =
new ElasticsearchWriteSettings(connection, 10, RetryNever, None, ApiVersion.V5, allowExplicitIndex = true)
new ElasticsearchWriteSettings(connection, 10, RetryNever, None, ApiVersion.V7, allowExplicitIndex = true)
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ElasticsearchSimpleFlowStageTest

val writer: StringMessageWriter = StringMessageWriter.getInstance
val settings: ElasticsearchWriteSettings = ElasticsearchWriteSettings(
ElasticsearchConnectionSettings("http://localhost:9201")
ElasticsearchConnectionSettings("http://localhost:9202")
)
val dummyMessages: (immutable.Seq[WriteMessage[String, NotUsed]], immutable.Seq[WriteResult[String, NotUsed]]) = (
immutable.Seq(
Expand All @@ -49,7 +49,7 @@ class ElasticsearchSimpleFlowStageTest
.probe[(immutable.Seq[WriteMessage[String, NotUsed]], immutable.Seq[WriteResult[String, NotUsed]])]
.via(
new impl.ElasticsearchSimpleFlowStage[String, NotUsed](
ElasticsearchParams.V5("es-simple-flow-index", "_doc"),
ElasticsearchParams.V7("es-simple-flow-index"),
settings,
writer
)
Expand Down