Up through ES 1.1.1 the following Java snippet was able to take an array of
one or more index specifications (e.g. test*, ix*, sgen) and create a list
of index names that match (e.g. test1, test2, test3, ix1, ix2, sgen):
/* Create array of 1 or more index specifications */
String indexSpecList = parseIndex(indexPattern);
- Get the list of individual index names, along with their status
- information (which we will ignore in this method)
IndicesAdminClient iac = client.admin().indices();
IndicesStatusRequestBuilder isrb = iac.prepareStatus();
IndicesStatusResponse isr = isrb.execute().actionGet();
/* Create an array of just the names of the indices */
ArrayList indices = new ArrayList();
Map<String, IndexStatus> ismap = isr.getIndices();
for (String index : ismap.keySet())
But in ES 1.2, the following classes are deprecated (and therefore result
in Javac build warnings which mean that someday these APIs may vanish).
What is the new recommendation for getting a list of the index names that
match a pattern? Would someone kindly point me to the acceptable 1.2
version of the API methods? Thank you!
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/68b00e23-7167-49f4-8738-a2ec2d8847f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.