A few things.
- I am surprised the response did not return an error. Facets work on the
document set returned by the query, so it is incorrect to add a query
section to the facet. Try it again without the query.
- Did you really use a JSON with a "body" section?
- The fields parameter does not form part of the query, but part of the
request.
Try something like:
{
"query": {
"match_all": {}
},
"fields": [
"title"
],
"facets": {
"company": {
"terms": {
"field": "locations"
}
}
}
}
On Fri, Jan 10, 2014 at 8:24 AM, <[email protected]> wrote:
> http://pastebin.ca/2532879
>
> As you can see, I am getting total, took, _shards and hits, but no facets.
> What am I doing wrong?
>
> Thank you for your time!
>
> --
> 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/86a1d8d1-c5a9-4e27-80eb-0a42d7c610aa%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/CALY%3DcQC_SWBgYfMSTC5gw0KrKhF3p7q%3DrRE4B_8S-gvHZwLwNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.