Hello folks,
I have create a java client to connect to elasticsearch and request a document in several indexes called analytics-%{+YYYY.MM.dd}. Here is my code:
try {
client = TransportClient.builder().build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(serverIpAddr), serverPort));
} catch (UnknownHostException e) {
e.printStackTrace();
}
GetResponse response = client.prepareGet("analytics*", "logs", "AVbgot3mAQOAFbgN9Rtz")
.setOperationThreaded(false)
.get();
However, I got the following error: [analytics*] IndexNotFoundException[no such index]
It works when I try with: 'analytics-2016.08.31' . However, for my purpose I need to request on multiple indexes.
Do you know how I can solve that ?
Thank you fopr your attention and your help.