Created
December 18, 2012 00:23
-
-
Save gibrown/4323746 to your computer and use it in GitHub Desktop.
ES fails when match_all filter uses an empty array with a faceted search.
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
SERVER="http://localhost:9200" | |
curl -XPUT "$SERVER/bugs/page/8872248-p-145" -d '{"id":145,"url":"http://alexsandbox.wordpress.com/header-test/","date":"2010-02-06 05:23:27","date_gmt":"2010-02-06 05:23:27","author":"Alex Mills","author_login":"viper007bond","title":"Header Test","content":"asdfasd as sad f","category":"Uncategorized","meta":{"_edit_lock":["1337928058:50392"],"_edit_last":["50392"],"_thumbnail_id":["147"]},"meta_raw":{"_edit_lock":["1337928058:50392"],"_edit_last":["50392"],"_thumbnail_id":["147"]}}' | |
curl -XGET "$SERVER/bugs/_search?pretty" -d ' | |
{ | |
"query":{"filtered":{"query":{"multi_match":{"query":"automattic","fields":["title","content"]}},"filter":{"match_all":{}}}}, | |
"facets" : { | |
"tag" : { | |
"terms" : { | |
"field" : "tag", | |
"size" : 10 | |
} | |
} | |
} | |
}' | |
curl -XGET "$SERVER/bugs/_search?pretty" -d ' | |
{ | |
"query":{"filtered":{"query":{"multi_match":{"query":"automattic","fields":["title","content"]}},"filter":{"match_all":[]}}}, | |
"facets" : { | |
"tag" : { | |
"terms" : { | |
"field" : "tag", | |
"size" : 10 | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment