Created
February 11, 2019 15:21
-
-
Save erickertz/4390bab69ac0c40451d4b5208b7f2242 to your computer and use it in GitHub Desktop.
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
{ | |
"aggregations": { | |
"skus.colorwayNames": { | |
"aggregations": { | |
"skus.colorwayNames_nested": { | |
"aggregations": { | |
"skus.colorwayNames_reverseNested": { | |
"terms": { | |
"field": "skus.colorwayNames", | |
"order": [{ | |
"_key": "asc" | |
}], | |
"size": 1000 | |
} | |
} | |
}, | |
"reverse_nested": {} | |
} | |
}, | |
"nested": { | |
"path": "skus" | |
} | |
} | |
}, | |
"post_filter": { | |
"bool": { | |
"must": { | |
"nested": { | |
"inner_hits": {}, | |
"path": "skus", | |
"query": { | |
"term": { | |
"skus.size": "41 Euro" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"query": { | |
"bool": { | |
"must": [{ | |
"term": { | |
"siteId": "fp-us" | |
} | |
}, { | |
"term": { | |
"language": "en-US" | |
} | |
}, { | |
"exists": { | |
"field": "skus.priceInventory.USD" | |
} | |
}, { | |
"term": { | |
"skus.priceInventory.USD.availablePools": "US_DIRECT" | |
} | |
}, { | |
"term": { | |
"isAvailable": true | |
} | |
}, { | |
"multi_match": { | |
"fields": ["title", "description", "keywords"], | |
"query": "Aspect", | |
"tie_breaker": 0, | |
"type": "cross_fields" | |
} | |
}, { | |
"nested": { | |
"inner_hits": {}, | |
"path": "skus", | |
"query": { | |
"range": { | |
"skus.priceInventory.USD.salePrice": { | |
"from": 100, | |
"include_lower": true, | |
"include_upper": true, | |
"to": 200 | |
} | |
} | |
} | |
} | |
}] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment