2

I was successfully able to get data from an individual index, but now I will have to get the data from 3 indexes, those 3 indexes are of different types (Student, Employee, School). With a single query trigger can I be able to get data from all the three index.

Abhishek Ekaanth
  • 2,511
  • 2
  • 19
  • 40

1 Answers1

4

In es you can specify that by URL

POST /gb,us/user,tweet/_search
{
//YOur query
}

In your case if you have one type per index it could be

POST /Student,Employee,School/_search

More info here

In Java according to this you should have smth like this

QueryBuilders.indicesQuery(queryBuilder, "product-a", "product-b");
Community
  • 1
  • 1
Vova Bilyachat
  • 18,765
  • 4
  • 55
  • 80