Skip to content

Instantly share code, notes, and snippets.

@zhangyuan
Forked from anonymous/request.json
Last active August 29, 2015 14:16
Show Gist options
  • Save zhangyuan/003506164400123b1ebb to your computer and use it in GitHub Desktop.
Save zhangyuan/003506164400123b1ebb to your computer and use it in GitHub Desktop.
{
"query": {
"filtered": {
"query": {
"multi_match": {
"query": "a",
"type": "cross_fields",
"operator": "AND",
"fields": [
"employeeId",
"firstName",
"lastName",
"primaryEmail",
"secondaryEmail"
]
}
},
"filter": {
"and" : {
"filters" : [
{
"nested" : {
"path" : "udfFields",
"filter" : {
"bool" : {
"must" : [
{"term" : {"udfFields.fieldId" : 1}},
{"terms" : {"udfFields.value" : ["A"]}}
]
}
}
}
},
{
"terms" : {"engagements.id" : [1]}
},
{
"nested" : {
"path" : "udfFields",
"filter" : {
"bool" : {
"must" : [
{"term" : {"udfFields.fieldId" : 2}},
{"terms" : {"udfFields.value" : ["B 2 A"]}}
]
}
}
}
}
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment