Hey @David, since Luca had zeroed-in-on the issue, I'll skip providing the
query this time.

@Luca - Thanks! That was exactly the problem! Another thing that is
inconsistent right now is that I can use date math against the _search
endpoint for filters but not against the _count endpoint in 0.90:
"lt" : "now",
"gte" : "now-1w"
versus:
"lt" : "2014-02-24",
"gte" : "2014-02-17"


- Pulkit
(646)-535-2357
Cofounder & CTO, ShoppinPal
https://linkedin.com/in/pulkitsinghal
https://coderbits.com/pulkitsinghal


On Mon, Feb 24, 2014 at 1:38 AM, Luca Cavanna <[email protected]> wrote:

> I guess you are still on 0.90, where the count request is slightly
> different compared to a search request, as it contains the query without it
> being wrapped into the query object:
>
> {
>     "term" : {"field":"value"}
> }
>
> instead of
>
> {
>     "query" : {
>         "term" : {"field":"value"}
>     }
> }
>
> Beware that we changed this in 1.0 to have consistency between count api
> and search api.
>
>
> On Monday, February 24, 2014 4:51:43 AM UTC+1, pulkitsinghal wrote:
>>
>> Hello,
>>
>> I have a bool query with a filter applied to it, which runs against the
>> _search endpoint successfully giving "hits.total" but unfortunately it also
>> gives a lot more data than that which I don't need.
>>
>> So I thought of running the same query against the _count endpoint but
>> there I received a failure: 
>> "BroadcastShardOperationFailedException[[index_test][0]
>> ]; nested: QueryParsingException[[index_test] No query registered for
>> [query]]; "
>>
>> Is there some other lightweight manner in which I can get just
>> "hits.total" without the added bloat of each matching doc?
>>
>> Thanks!
>> - Pulkit
>>
>  --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/6d7827db-af6e-4f5e-a394-bfb09652be7a%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CADA%3DEV807-Us2vVqcf8vbif-1Mxsx4rGtV8nn%3D0KyX_tWJYLaA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to