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.
Asked
Active
Viewed 790 times
2

Abhishek Ekaanth
- 2,511
- 2
- 19
- 40
-
Each index has only one type or multiple? – Vova Bilyachat Apr 24 '17 at 05:30
-
each index has only one type – Abhishek Ekaanth Apr 24 '17 at 05:31
1 Answers
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
-
ty so much. I forgot to mention i was looking for JAVA API :) – Abhishek Ekaanth Apr 24 '17 at 05:38
-
-
-