I have tried following query: I want to apply AND operator in that query to retrive those document that department name is Computer Science AND department path contains term "Second".
curl -XGET 'http://192.168.1.2:9200/records/_search' -d'{
"query": {
"bool": {
"must": [
{
"match":
{
"department.deptname" : "Computer Science"
}
},
{
"match":
{
"department.deptpath" : "Second"
}
}
]
}
}
}'
Yes It gives me all record. It will not full fill my requirement because match doesn't apply on department object it just applies on document, It will retrive all document that contains department name is Computer Science or department path "Second".
Can you please give me suggestion how will i write correct query for object.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.