[BUG] indexDocument version should be a Long
Closed this issue · 1 comments
frisi commented
The version
param in SearchClient.indexDocument
should be of type Long
instead of Int
to support all usecases (eg using millis-since-epoch as version)
see also Elasticsearch Docs on indexing:
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"
),
Your context
- search-client 2.1.1"
Will you be able to help with a pull request?
no, sorry ;-)
jillesvangurp commented
Thanks for reporting this. You are right, this should be a Long.