Problemas running curl


(Alexandre Gomes) #1

Hi all.

I'm trying to recover information from [1]. TheDataHub.Org portal is based
on CKAN [2], an open data platform, and, as stated in [3], it uses
ElasticSearch underneath.

The schema is available at [4].

I'm having problems performing queries at the command line.

As you can see, q=Tema:aeroportos works fine [5]. However,
source='{"query":{"match_all":{}}}' only works on web browser [6], and the
same thing happens with '{"query":{"term":{"Tema":"aeroportos"}}}' [7]

What am I missing?

[1] http://thedatahub.org/dataset/copa-2014
[2] http://ckan.org/
[3] http://docs.ckan.org/en/latest/using-data-api.html
[4] https://gist.github.com/2721069#file_mapping
[5] https://gist.github.com/2721069#file_q_tema_aeroportos
[6] https://gist.github.com/2721069#file_query_match_all
[7] https://gist.github.com/2721069#file_query_term_tema_aeroportos

thanks a lot


(Shay Banon) #2

I Am not really sure how CKAN converts the API calls to elasticsearch, but
your samples should work with vanilla ES. The body query for example looks
good.

On Thu, May 17, 2012 at 9:25 PM, Alexandre Gomes alegomes@gmail.com wrote:

Hi all.

I'm trying to recover information from [1]. TheDataHub.Org portal is based
on CKAN [2], an open data platform, and, as stated in [3], it uses
ElasticSearch underneath.

The schema is available at [4].

I'm having problems performing queries at the command line.

As you can see, q=Tema:aeroportos works fine [5]. However,
source='{"query":{"match_all":{}}}' only works on web browser [6], and
the same thing happens with '{"query":{"term":{"Tema":"aeroportos"}}}' [7]

What am I missing?

[1] http://thedatahub.org/dataset/copa-2014
[2] http://ckan.org/
[3] http://docs.ckan.org/en/latest/using-data-api.html
[4] https://gist.github.com/2721069#file_mapping
[5] https://gist.github.com/2721069#file_q_tema_aeroportos
[6] https://gist.github.com/2721069#file_query_match_all
[7] https://gist.github.com/2721069#file_query_term_tema_aeroportos

thanks a lot


(system) #3