Query : Use of Union feature in elastic search

Hello Folks,
How to union the result of two or more query . Elastic search query.
I used following Dis Max Query for union
curl -XGET 'http://localhost:9200/new_index/n
ew_indext/_search?size=2' -d'{"query":{

"dis_max" : {
    "tie_breaker" : 0.7,
    "queries" : [
        {
            "term" : { "MsgData" : "Aeropostale)" }
        },
        {
            "term" : { "MsgData" : "ebook" }
        }
    ]
}

}
}'

expected output: both aeropostale and ebook
output rcieved from this query : only ebook.
can you please help me where I am doing wrong.

thanks and regards
Mohit Kumar Yadav

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Use bool query.

On Tuesday, February 12, 2013 10:56:54 AM UTC+5:30, Mohit Kumar Yadav wrote:

Hello Folks,
How to union the result of two or more query . Elastic search query.
I used following Dis Max Query for union
curl -XGET 'http://localhost:9200/new_index/n
ew_indext/_search?size=2' -d'{"query":{

"dis_max" : {
    "tie_breaker" : 0.7,
    "queries" : [
        {
            "term" : { "MsgData" : "Aeropostale)" }
        },
        {
            "term" : { "MsgData" : "ebook" }
        }
    ]
}

}
}'

expected output: both aeropostale and ebook
output rcieved from this query : only ebook.
can you please help me where I am doing wrong.

thanks and regards
Mohit Kumar Yadav

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.