ElasticSearch produces failures during query execution

Hello.
I try to complete the following query, but the elasticsearch engine
returns to me strange results. Fiddler shows that the engine generates
some failures (see later).
How I can rebuild the query to get correct result?

The Query:
{
"min_score":0.09,
"query":{
"bool":{
"should":[
{
"filtered":{
"query":{
"text":{
"name":{
"query":"",
"type":"phrase_prefix",
"operator":"or",
"fuzziness":1,
"prefix_length":0,
"boost":2
}
}
},
"filter":{
"nested":{
"path":"recalls",
"query":{
"bool":{
"must":[
{
"term":{
"recalls.atMorning":"true"
}
}
]
}
},
"_cache":true
}
}
}
},
{
"filtered":{
"query":{
"match_all":{

                 }
              },
              "filter":{
                 "nested":{
                    "path":"recalls",
                    "query":{
                       "bool":{
                          "must":[
                             {
                                "term":{
                                   "recalls.atMorning":"true"
                                }
                             }
                          ]
                       }
                    },
                    "_cache":true
                 }
              }
           }
        }
     ]
  }

},
"from":0,
"size":50
}

Results:

{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 4,
"failed" : 1,
"failures" : [ {
"index" : "cards_bmv",
"shard" : 1,
"status" : 500,
"reason" : "QueryPhaseExecutionException[[cards_bmv][1]:
query[filtered(MatchNoDocsQuery)->QueryWrapperFilter(BlockJoinQuery
(filtered(+recalls.date:[1333324800000 TO *] +recalls.atMorning:T)-

FilterCacheFilterWrapper(_type:__recalls)))
ConstantScore(QueryWrapperFilter(BlockJoinQuery
(filtered(+recalls.date:[1333324800000 TO *] +recalls.atMorning:T)-
FilterCacheFilterWrapper(_type:__recalls))))],from[0],size[50]: Query
Failed [Failed to execute main query]]; nested: "
} ]
},
"hits" : {
"total" : 2,
"max_score" : 0.5,
"hits" : [ {
"_index" : "cards_bmv",
"_type" : "cards",
"_id" : "172",
...

There should be a failure in the log itself of elasticsearch, can you gist
it?

On Fri, Apr 6, 2012 at 6:55 AM, Mikhail Berezovsky <
mikhail.berezovsky@gmail.com> wrote:

Hello.
I try to complete the following query, but the elasticsearch engine
returns to me strange results. Fiddler shows that the engine generates
some failures (see later).
How I can rebuild the query to get correct result?

The Query:
{
"min_score":0.09,
"query":{
"bool":{
"should":[
{
"filtered":{
"query":{
"text":{
"name":{
"query":"",
"type":"phrase_prefix",
"operator":"or",
"fuzziness":1,
"prefix_length":0,
"boost":2
}
}
},
"filter":{
"nested":{
"path":"recalls",
"query":{
"bool":{
"must":[
{
"term":{
"recalls.atMorning":"true"
}
}
]
}
},
"_cache":true
}
}
}
},
{
"filtered":{
"query":{
"match_all":{

                }
             },
             "filter":{
                "nested":{
                   "path":"recalls",
                   "query":{
                      "bool":{
                         "must":[
                            {
                               "term":{
                                  "recalls.atMorning":"true"
                               }
                            }
                         ]
                      }
                   },
                   "_cache":true
                }
             }
          }
       }
    ]
 }

},
"from":0,
"size":50
}

Results:

{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 4,
"failed" : 1,
"failures" : [ {
"index" : "cards_bmv",
"shard" : 1,
"status" : 500,
"reason" : "QueryPhaseExecutionException[[cards_bmv][1]:
query[filtered(MatchNoDocsQuery)->QueryWrapperFilter(BlockJoinQuery
(filtered(+recalls.date:[1333324800000 TO *] +recalls.atMorning:T)-

FilterCacheFilterWrapper(_type:__recalls)))
ConstantScore(QueryWrapperFilter(BlockJoinQuery
(filtered(+recalls.date:[1333324800000 TO *] +recalls.atMorning:T)-
FilterCacheFilterWrapper(_type:__recalls))))],from[0],size[50]: Query
Failed [Failed to execute main query]]; nested: "
} ]
},
"hits" : {
"total" : 2,
"max_score" : 0.5,
"hits" : [ {
"_index" : "cards_bmv",
"_type" : "cards",
"_id" : "172",
...