Query functionality of Elasticsearch

Hi all....
Here what i am trying is i have created two indices(index1 and index2) each index holds different data in it, and i have assigned same alias(alise1) name for both the indices.
Lets say if I have to query with alias name(alise1) for the documents that have Severity = 5 AND TicketNo = 5
and in this case, Severity is a field in index1 and TicketNo is a field in index2
would that work ?

Thank you.

That query will look for documents fulfilling both criteria. As there are no documents that contain both fields, you would get no hits.

1 Like

Yes exactly,
but is there any way for doing that in Elasticsearch?

You can not join across indices if that is what you are looking for. You can however use a should clause to get documents that match one of the conditions.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.