If I want to have my index rotated daily, so I would need to pass the date as part of the index name? Is there an option for that or do I have to append it to the name manually?
I'm using the example below from the Java docs, is it possible to print out the json Object as a string for debugging purposes?
IndexResponse response = client.prepareIndex("test_db", "metrics")
.setSource(jsonBuilder()
.startObject()
.field("user", "kimchy")
.field("postDate", new Date())
.field("message", "trying out Elasticsearch")
.field("number", 10)
.endObject()
)
.get();
thanks