Just looking at the documentation for the High level Rest Client.
Probably a trivial question (as I assume all 3 methods are doing largely the same thing), but the document offers 3 different ways to build documents to add to an index
- Document source provided as a Map which gets automatically converted to JSON format
- Document source provided as an XContentBuilder object, the Elasticsearch built-in helpers to generate JSON content
- Document source provided as Object key-pairs, which gets converted to JSON format
Aesthetically I like the look of XContentBuilder but as I'm starting from scratch I just wondered if there were any benchmarks comparing the 3 methods or recommendations ?