Created
July 10, 2015 14:04
-
-
Save spinscale/90583f86bbd61acfcf9e to your computer and use it in GitHub Desktop.
filter broken
This file contains hidden or 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
PUT /foo/bar/1 | |
{ | |
"field1" : "foo", | |
"field2" : "foo" | |
} | |
PUT /foo/bar/2 | |
{ | |
"field1" : "bar", | |
"field2" : "bar" | |
} | |
PUT /foo/bar/3 | |
{ | |
"field1" : "foo", | |
"field2" : "bar" | |
} | |
GET /foo/bar/_search | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"term": { | |
"field1": "foo", | |
"field2": "bar" | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or 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
{ | |
"took": 1, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 2, | |
"max_score": 1, | |
"hits": [ | |
{ | |
"_index": "foo", | |
"_type": "bar", | |
"_id": "2", | |
"_score": 1, | |
"_source": { | |
"field1": "bar", | |
"field2": "bar" | |
} | |
}, | |
{ | |
"_index": "foo", | |
"_type": "bar", | |
"_id": "3", | |
"_score": 1, | |
"_source": { | |
"field1": "foo", | |
"field2": "bar" | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment