# Sample setting with elasticsearch input plugin doesn't work

**URL:** <https://discuss.elastic.co/t/sample-setting-with-elasticsearch-input-plugin-doesnt-work/84764>\
**Category:** Logstash\
**Created:** [May 5, 2017, 5:17pm UTC](https://discuss.elastic.co/t/sample-setting-with-elasticsearch-input-plugin-doesnt-work/84764 "2017-05-05T17:17:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shin0higuchi](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@shin0higuchi](https://discuss.elastic.co/u/shin0higuchi)\
**Post date:** [May 5, 2017, 5:17pm UTC](https://discuss.elastic.co/t/sample-setting-with-elasticsearch-input-plugin-doesnt-work/84764/1 "2017-05-05T17:17:48Z")

</div>

A sample setting on [https://www.elastic.co/guide/en/logstash/current/plugins-inputs-elasticsearch.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-elasticsearch.html) may not work.

- Sample  
input {  
elasticsearch {  
hosts =\> "[es.production.mysite.org](http://es.production.mysite.org)"  
index =\> "mydata-2018.09._"  
query =\> "_"  
size =\> 500  
scroll =\> "5m"  
docinfo =\> true  
}  
}

- Version: logstash 5.4.0

- Operating System: macOS Sierra 10.12.4

- Config File (if you have sensitive info, please remove it):

- Error Message:  
Error: [500] {"error":{"root\_cause":[{"type":"json\_parse\_exception","reason":"Unexpected character ('_' (code 42)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5d974f5e; line: 1, column: 2]"}],"type":"json\_parse\_exception","reason":"Unexpected character ('_' (code 42)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5d974f5e; line: 1, column: 2]"},"status":500}

---

<div class="post-metadata">

**Author:** ![orhiee](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@orhiee](https://discuss.elastic.co/u/orhiee)\
**Post date:** [May 23, 2017, 3:58pm UTC](https://discuss.elastic.co/t/sample-setting-with-elasticsearch-input-plugin-doesnt-work/84764/2 "2017-05-23T15:58:43Z")

</div>

just had the same error

remove the line " query =\> '\*' "all should be good 🙂

---

<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:** [June 20, 2017, 3:58pm UTC](https://discuss.elastic.co/t/sample-setting-with-elasticsearch-input-plugin-doesnt-work/84764/3 "2017-06-20T15:58:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
