I did the following request now:
{
"query": {
"match_all": {}
},
"facets": {
"company": {
"terms": {
"field": "locations",
"all_terms": true
}
}
}
}
And I got exactly the same response :(
Am Freitag, 10. Januar 2014 17:37:20 UTC+1 schrieb Ivan Brusic:
>
> 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] <javascript:>>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] <javascript:>.
>> 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/24d42cc9-4f56-41c0-a18f-236bee7538ff%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.