Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.15.0
Description
The `.id(key)` in the RowElasticsearchEmitter make users get confused.
The following is the source code. key always null, we can never call the `id` method.
if (key != null) { final UpdateRequest updateRequest = new UpdateRequest(indexGenerator.generate(row), documentType, key) .doc(document, contentType) .upsert(document, contentType); indexer.add(updateRequest); } else { final IndexRequest indexRequest = new IndexRequest(indexGenerator.generate(row), documentType) .id(key) .source(document, contentType); indexer.add(indexRequest); }