I inserted some review queues into an ES index. I know I was successful
because I can query them out:
QUERY
{"query":{"match_all":{}},"from":0,"size":10,"sort":[]}
RESULT
{
"took": 17,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 107837,
"max_score": 1,
"hits": [
{
"_index": "reviews121107_173437",
"_type": "review",
"_id": "729817",
"_score": 1,
"_source": {
"review_time": "2012-04-27T17:47:36.000Z",
"bug_id": 739994,
"attach_id": "619104",
"reviewer": "xxxxxx@mozilla.com",
"requester": "yyyyyy@mozilla.com",
"request_time": "2012-04-27T17:42:09.000Z",
"close_record": {
"name": "null"
}
}
},
But when I ask for a specific term, I get nothing
QUERY
{"query":{"filtered":{"query":{"match_all":{}},"filter":{"and":[{"term":{"reviewer":"
xxxxxx@mozilla.com"}}]}}},"from":0,"size":10,"sort":[]}
RESULT
{
"took": 4,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
What is the incantation to get this search to work?
Here is my mapping, in case you think it is an analyzer problem:
mappings.reviews={
"_source":{"enabled": true},
"_all" : {"enabled" : false},
"bug_id":{"type":"integer", "store":"yes", "index":"not_analyzed"},
"attach_id":{"type":"integer", "store":"yes",
"index":"not_analyzed"},
"requester":{"type":"string", "store":"yes",
"index":"not_analyzed"},
"reviewer":{"type":"string", "store":"yes", "index":"not_analyzed"},
"request_time":{"type":"long", "store":"yes",
"index":"not_analyzed"},
"review_time":{"type":"long", "store":"yes",
"index":"not_analyzed"},
"done_reason":{"type":"string", "store":"yes",
"index":"not_analyzed"}
}
--