Filtered query - SearchParseException Parse Failure [No parser for element...]

for this query

{
"query":{
"filtered":{
"query":{
"match_all":{

        }
     },
     "filter":{
        "bool":{
           "must":[
              {
                 "term":{
                    "loc":"US"
                 }
              },
              {
                 "range":{
                    "num":{
                       "gt":0
                    }
                 }
              },
              {
                 "terms":{
                    "tlbl":[
                       3
                    ]
                 }
              }
           ]
        }
     }
  },
  "sort":[
     {
        "lbl_3":{
           "order":"desc"
        }
     }
  ],
  "size":100

}
}

I get this error response:
nested: SearchParseException[[test_index][5]:
query[ConstantScore(NotDeleted(BooleanFilter( +cache(loc:US) +cache(num:{0
TO *]) +cache(tlbl:`\b\u0000\u0000\u0000\u0003))))],from[-1],size[-1]:
Parse Failure [No parser for element [lbl_3]]]; }]",

However with this query there is no error and documents are returned:

{
"query":{
"match_all":{

  }

},
"filter":{
"bool":{
"must":[
{
"term":{
"loc":"US"
}
},
{
"range":{
"num":{
"gt":0
}
}
},
{
"terms":{
"tlbl":[
3
]
}
}
]
}
},
"sort":[
{
"lbl_3":{
"order":"desc"
}
}
],
"size":100
}

"lbl_3" is mapped in the index as integer type, include_in_all false and
not analyzed. Not every document will have data for this field. I'm running
0.90.2.

thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

My closing bracket for the top "query" is in the wrong spot. I corrected it
and it works

On Wednesday, July 17, 2013 10:39:17 AM UTC-4, Joe Wong wrote:

for this query

{
"query":{
"filtered":{
"query":{
"match_all":{

        }
     },
     "filter":{
        "bool":{
           "must":[
              {
                 "term":{
                    "loc":"US"
                 }
              },
              {
                 "range":{
                    "num":{
                       "gt":0
                    }
                 }
              },
              {
                 "terms":{
                    "tlbl":[
                       3
                    ]
                 }
              }
           ]
        }
     }
  },
  "sort":[
     {
        "lbl_3":{
           "order":"desc"
        }
     }
  ],
  "size":100

}
}

I get this error response:
nested: SearchParseException[[test_index][5]:
query[ConstantScore(NotDeleted(BooleanFilter( +cache(loc:US) +cache(num:{0
TO *]) +cache(tlbl:`\b\u0000\u0000\u0000\u0003))))],from[-1],size[-1]:
Parse Failure [No parser for element [lbl_3]]]; }]",

However with this query there is no error and documents are returned:

{
"query":{
"match_all":{

  }

},
"filter":{
"bool":{
"must":[
{
"term":{
"loc":"US"
}
},
{
"range":{
"num":{
"gt":0
}
}
},
{
"terms":{
"tlbl":[
3
]
}
}
]
}
},
"sort":[
{
"lbl_3":{
"order":"desc"
}
}
],
"size":100
}

"lbl_3" is mapped in the index as integer type, include_in_all false and
not analyzed. Not every document will have data for this field. I'm
running 0.90.2.

thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.