Created
June 18, 2015 10:11
-
-
Save teroxik/32e421279b4652cfc04e to your computer and use it in GitHub Desktop.
Queries + results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST localhost:9200/estest/es -d '{ | |
"query": { | |
"filtered": { | |
"query": { | |
"query_string": { | |
"query": "AXN" | |
} | |
}, | |
"filter": { | |
"bool": { | |
"must": [ | |
{ | |
"nested": { | |
"path": "itemData", | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"itemData.ingest_status": "failed" | |
} | |
}, | |
{ | |
"nested": { | |
"path": "itemData.destinationData", | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"destinationName": "corner case" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
}' | |
expected result: 0 | |
The AXN - destinationName - it is in the different subtree of orderItem / destination | |
result: | |
{ | |
"took": 3, | |
"timed_out": false, | |
"_shards": { | |
"total": 3, | |
"successful": 3, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 1, | |
"max_score": 0.3194296, | |
"hits": [ | |
{ | |
"_index": "estest", | |
"_type": "es", | |
"_id": "551a82b6e4b034a84c362a0d", | |
"_score": 0.3194296, | |
"_source": { | |
"_id": "551a82b6e4b034a84c362a0d", | |
"assignedUsers": [], | |
"comments": [], | |
"itemData": [ | |
{ | |
"_id": "551a82b7e4b034a84c362a0e", | |
"ingest_status": "requested", | |
"created": "2015-03-31T12:19:19.708Z", | |
"destinationData": [ | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c6", | |
"approvals": [], | |
"destinationName": "Discovery Networks Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.861Z", | |
"destinationId": "1967" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c5", | |
"approvals": [], | |
"destinationName": "Calle 13 / SyFy", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.860Z", | |
"destinationId": "1975" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528be", | |
"approvals": [], | |
"destinationName": "AMC Networks Pulsa", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.848Z", | |
"destinationId": "2042" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c1", | |
"approvals": [], | |
"destinationName": "MTV España – Paramount Channel", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "595" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c2", | |
"approvals": [], | |
"destinationName": "Nickelodeon Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "596" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c0", | |
"approvals": [], | |
"destinationName": "Fox Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "597" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c4", | |
"approvals": [], | |
"destinationName": "Comedy Central", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.857Z", | |
"destinationId": "598" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528bf", | |
"approvals": [], | |
"destinationName": "Turner Spain SD", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.850Z", | |
"destinationId": "6245" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c3", | |
"approvals": [], | |
"destinationName": "AXN Spain SD", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.855Z", | |
"destinationId": "768" | |
} | |
] | |
}, | |
{ | |
"_id": "551a82b7e4b034a84c362a0e", | |
"ingest_status": "failed", | |
"created": "2015-03-31T12:19:19.708Z", | |
"destinationData": [ | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c6", | |
"approvals": [], | |
"destinationName": "Discovery Networks Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.861Z", | |
"destinationId": "1967" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c5", | |
"approvals": [], | |
"destinationName": "Calle 13 / SyFy", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.860Z", | |
"destinationId": "1975" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528be", | |
"approvals": [], | |
"destinationName": "AMC Networks Pulsa", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.848Z", | |
"destinationId": "2042" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c1", | |
"approvals": [], | |
"destinationName": "MTV España – Paramount Channel", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "595" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c2", | |
"approvals": [], | |
"destinationName": "Nickelodeon Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "596" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c0000b8680528c0", | |
"approvals": [], | |
"destinationName": "Fox Spain", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.852Z", | |
"destinationId": "597" | |
}, | |
{ | |
"deliveryStatus": "Online", | |
"orderItemId": "551a82b7e4b034a84c362a0e", | |
"_id": "551ad0643c000068690528c4", | |
"approvals": [], | |
"destinationName": "corner case", | |
"status": "MasterSupplied", | |
"destinationStatus": "Offline", | |
"creationDate": "2015-03-31T17:50:44.857Z", | |
"destinationId": "725" | |
} | |
] | |
} | |
] | |
} | |
} | |
] | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment