I would like to add some basic tests into my Java app. I'm using es 5.6 with low & high level rest client. Essentially, at this early stage I would just like to create an index, add some documents & validate them. Having had a 1/2 hour scoot around the web I'm thinking the easiest thing to do is to just create an index on the local server (dev/test etc) and then tear it down at the end.
It strikes me that if there is a failure in the process I will leave some 'orphaned' mini indexes in place but I can probably live with that and maybe even write some code to list indexes and tidy the node at some later point (or just restore a clean node!).
Anyway I was just wondering if this is a reasonable approach or whether there is some kind of clever (in memory ?) process to do this off the main elasticSearch installation ? (Even better if someone has some code to help a simpleton onto the right track but really I'm mainly looking for guidance as to the approach I should take.