Open
Description
I may just be missing something, but it seems like the wrong id is being passed in the ExampleJobPrep job, which results in elastic search indexing documents with the generated "customer ids" rather than the actual unique document ids? The result for me anyway is that only a few documents are created and then updated many times when running the example flow.
index 8a256c0..8e750ef 100644
--- a/src/main/java/com/inin/analytics/elasticsearch/example/ExampleJobPrep.java
+++ b/src/main/java/com/inin/analytics/elasticsearch/example/ExampleJobPrep.java
@@ -56,7 +56,7 @@ public class ExampleJobPrep implements Tool {
String routingHash = elasticsearchRoutingStrategy.getRoutingHash(customerId, docId);
Text outputKey = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + routingHash);
- Text outputValue = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + customerId + BaseESReducer.TUPLE_SEPARATOR + json);
+ Text outputValue = new Text(INDEX_TYPE + BaseESReducer.TUPLE_SEPARATOR + docId + BaseESReducer.TUPLE_SEPARATOR + json);
context.write(outputKey, outputValue);
}
}```
Metadata
Metadata
Assignees
Labels
No labels