Hi,
I working on a use case of something similar to the scenario mentioned below:
- Suppose I have indices called "Teacher" and "Student"
Sample data of "Teacher" and "Student" are - - Teacher
{
"city": "Madrid",
"name": "pranav",
"birth_month": "february",
"TeacherId": "2623"
}
- Student
{
"studentId": "2123",
"city": "Madrid",
"name": "abc",
"birth_month": "february"
}
Now I am searching on both the indices at once by mentioning both the indices using comma operator, for birth_month to be february .
Elastic returns these two documents as two different results. But I need results to be unique based on its city i.e., these two documents have to be part of one result based on its city value. Is there any method that I can implement this?