Query functionality of Elasticsearch


(Kabali12345) #1

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.
Now
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.


(Christian Dahlqvist) #2

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


(Kabali12345) #3

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


(Christian Dahlqvist) #4

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.


(system) #5

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