Skip to content

Instantly share code, notes, and snippets.

@sergibondarenko
Last active January 26, 2017 16:09
Show Gist options
  • Save sergibondarenko/76d85f5078a8facd710f88a2c5e2fce3 to your computer and use it in GitHub Desktop.
Save sergibondarenko/76d85f5078a8facd710f88a2c5e2fce3 to your computer and use it in GitHub Desktop.
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"must_not": [],
"filter": {
"bool": {
"must": [
{
"join_sequence": [
{
"relation": [
{
"pattern": "spaceship_project",
"path": "item_id",
"indices": [
"spaceship_project"
],
"queries": [
{
"query": {
"bool": {
"must": [
{
"query": {
"query_string": {
"analyze_wildcard": true,
"query": "*"
}
}
},
{
"query": {
"query_string": {
"query": "item_type:spaceship_parts",
"analyze_wildcard": true
}
}
}
],
"must_not": [],
"filter": {
"bool": {
"must": []
}
}
}
}
}
],
"termsEncoding": "long",
"types": [
"spaceship_parts"
]
},
{
"pattern": "spaceship_project",
"path": "item_id",
"indices": [
"spaceship_project"
],
"termsEncoding": "long",
"types": [
"spaceship_service"
]
}
]
}
]
},
{
"query": {
"query_string": {
"query": "item_type:spaceship_service",
"analyze_wildcard": true
}
}
}
]
}
}
}
},
"size": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment