# Problemas running curl

**URL:** <https://discuss.elastic.co/t/problemas-running-curl/7750>\
**Category:** Elasticsearch\
**Created:** [May 17, 2012, 7:25pm UTC](https://discuss.elastic.co/t/problemas-running-curl/7750 "2012-05-17T19:25:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Gomes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_gomes/32/2881_2.png) [@Alexandre\_Gomes](https://discuss.elastic.co/u/Alexandre_Gomes)\
**Post date:** [May 17, 2012, 7:25pm UTC](https://discuss.elastic.co/t/problemas-running-curl/7750/1 "2012-05-17T19:25:12Z")

</div>

Hi all.

I'm trying to recover information from [1]. [TheDataHub.Org](http://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](http://thedatahub.org/dataset/copa-2014)  
[2] [http://ckan.org/](http://ckan.org/)  
[3] [http://docs.ckan.org/en/latest/using-data-api.html](http://docs.ckan.org/en/latest/using-data-api.html)  
[4] [https://gist.github.com/2721069#file\_mapping](https://gist.github.com/2721069#file_mapping)  
[5] [https://gist.github.com/2721069#file\_q\_tema\_aeroportos](https://gist.github.com/2721069#file_q_tema_aeroportos)  
[6] [https://gist.github.com/2721069#file\_query\_match\_all](https://gist.github.com/2721069#file_query_match_all)  
[7] [https://gist.github.com/2721069#file\_query\_term\_tema\_aeroportos](https://gist.github.com/2721069#file_query_term_tema_aeroportos)

thanks a lot

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 20, 2012, 8:07pm UTC](https://discuss.elastic.co/t/problemas-running-curl/7750/2 "2012-05-20T20:07:27Z")

</div>

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](mailto:alegomes@gmail.com) wrote:

> Hi all.
> 
> I'm trying to recover information from [1]. [TheDataHub.Org](http://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](http://thedatahub.org/dataset/copa-2014)  
> [2] [http://ckan.org/](http://ckan.org/)  
> [3] [http://docs.ckan.org/en/latest/using-data-api.html](http://docs.ckan.org/en/latest/using-data-api.html)  
> [4] [World Cup 2014 Data Search · GitHub](https://gist.github.com/2721069#file_mapping)  
> [5] [World Cup 2014 Data Search · GitHub](https://gist.github.com/2721069#file_q_tema_aeroportos)  
> [6] [World Cup 2014 Data Search · GitHub](https://gist.github.com/2721069#file_query_match_all)  
> [7] [World Cup 2014 Data Search · GitHub](https://gist.github.com/2721069#file_query_term_tema_aeroportos)
> 
> thanks a lot

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:27am UTC](https://discuss.elastic.co/t/problemas-running-curl/7750/3 "2017-07-06T03:27:59Z")

</div>


