The value provided must be a numeric, long value greater than or equal to 0, and less than around 9.2e+18.
As a workaround, one can use extraParameters
val version = 1697624118596L
client.indexDocument(
indexName,
doc
id = id,
// version = version.toInt(),
versionType = VersionType.External,
extraParameters = mapOf(
"version" to "$version"
),
The
version
param inSearchClient.indexDocument
should be of typeLong
instead ofInt
to support all usecases (eg using millis-since-epoch as version)see also Elasticsearch Docs on indexing:
As a workaround, one can use extraParameters
Your context
Will you be able to help with a pull request?
no, sorry ;-)