# Can't make your 'Talking to Elastic Search' examples work

**URL:** <https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714>\
**Category:** Elasticsearch\
**Created:** [February 25, 2016, 1:14pm UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714 "2016-02-25T13:14:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattyb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattyb/32/8055_2.png) [@mattyb](https://discuss.elastic.co/u/mattyb)\
**Post date:** [February 25, 2016, 1:14pm UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/1 "2016-02-25T13:14:02Z")

</div>

I need to learn (told to by management) Elasticsearch and Logstash. Installed and ran elasticsearch on Linux (a server). Trying to input the employee stuff here : [https://www.elastic.co/guide/en/elasticsearch/guide/current/\_indexing\_employee\_documents.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/_indexing_employee_documents.html)

This works :  
curl -XGET 'localhost:9200/\_count?pretty' -d '  
{  
"query": {  
"match\_all": {}  
}  
}'  
This doesn't :  
curl -XPUT 'localhost:9200/megacorp/employee/1  
{  
"first\_name" : "John",  
"last\_name" : "Smith",  
"age" : 25,  
"about" : "I love to go rock climbing",  
}'  
Neither does this:  
curl -XPUT 'localhost:9200/megacorp/employee/2  
{  
"first\_name" : "Jane",  
"last\_name" : "Smith",  
"age" : 32,  
"about" : "I like to collect rock albums",  
"interests": ["music"]  
}'  
I have no idea what this means :  
curl: (3) Illegal characters found in URL  
I have no idea what this means :  
curl: (3) [globbing] nested braces not supported at pos 193

I only have command line access on the server. The server cannot connect to the internet. I won't be using Kibana or Sense.

Can someone give me a link to a site or a resource that will help me troubleshoot these errors please?

---

<div class="post-metadata">

**Author:** ![mattyb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattyb/32/8055_2.png) [@mattyb](https://discuss.elastic.co/u/mattyb)\
**Post date:** [February 25, 2016, 4:23pm UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/2 "2016-02-25T16:23:43Z")

</div>

This worked :  
curl -XPUT '[http://localhost:9200/megacorp/employee/2](http://localhost:9200/megacorp/employee/2)' -d '

> {  
> "first\_name" : "Jane",  
> "last\_name" : "Smith",  
> "age" : 32,  
> "about" : "I like to collect rock albums",  
> "interests": ["music"]  
> }'

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 25, 2016, 11:12pm UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/3 "2016-02-25T23:12:42Z")

</div>

The syntax in the docs is Sense based - [https://www.elastic.co/guide/en/sense/current/index.html](https://www.elastic.co/guide/en/sense/current/index.html)

You will need to escape things accordingly if you are using curl.

---

<div class="post-metadata">

**Author:** ![mattyb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattyb/32/8055_2.png) [@mattyb](https://discuss.elastic.co/u/mattyb)\
**Post date:** [February 26, 2016, 10:35am UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/4 "2016-02-26T10:35:26Z")

</div>

Thankyou for your response. I understood that and put the curl details around the GET and PUT commands. I can only use curl, I cannot install Kibana or Sense.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 28, 2016, 11:47am UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/5 "2016-02-28T11:47:54Z")

</div>

Judging by the error messages I'd say you're suffering from the same kind of quote damage described here: [Trying to reduce the storage used by elasticsearch2.2](https://discuss.elastic.co/t/trying-to-reduce-the-storage-used-by-elasticsearch2-2/42922/3)

---

<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 5, 2017, 11:13pm UTC](https://discuss.elastic.co/t/cant-make-your-talking-to-elastic-search-examples-work/42714/6 "2017-07-05T23:13:04Z")

</div>


