[ckan-discuss] Terms Facet
Alexandre Gomes
alegomes at gmail.com
Wed May 23 01:16:15 BST 2012
Oops. My bad. Thank you, David.
Now, let's talk about encoding. I'll open a new thread.
[]s!
On Tue, May 22, 2012 at 9:06 PM, David Raznick <kindly at gmail.com> wrote:
>
>
> On Wed, May 23, 2012 at 12:26 AM, Alexandre Gomes <alegomes at gmail.com>wrote:
>
>> Hi!
>>
>> Can you, please, tell me what's wrong with this?
>>
>>
>> http://thedatahub.org/api/data/4e256209-7e2d-4481-9627-da73e191baf2/_search?pretty=true&source={
>> "query":{"match_all":{}},"facets":{"temas":{"terms":{"field":"Tema"}}}}
>>
>
> That is correct. The facets are also in the result json along with the
> hits. Its a big json so you may have missed it. I get the below with the
> above query.
>
> Thanks
>
> David
>
>
> facets": {
>
> - "temas": {
> - "_type": "terms",
> - "missing": 0,
> - "total": 490,
> - "other": 0,
> - "terms": [
> - {
> - "term": "urbana",
> - "count": 147
> },
> - {
> - "term": "mobilidade",
> - "count": 147
> },
> - {
> - "term": "aeroportos",
> - "count": 49
> },
> - {
> - "term": "seguranpa",
> - "count": 42
> },
> - {
> - "term": "esto",
> - "count": 35
> },
> - {
> - "term": "arena",
> - "count": 35
> },
> - {
> - "term": "portos",
> - "count": 18
> },
> - {
> - "term": "hotelaria",
> - "count": 9
> },
> - {
> - "term": "telecomunicas",
> - "count": 8
> }
> ]
> }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-discuss/attachments/20120522/2e1f68f4/attachment-0001.htm>
More information about the ckan-discuss
mailing list