# Pipeline error {:pipeline\_id=\>"main", :exception=\>#\<LogStash::Json::ParserError: Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

**URL:** <https://discuss.elastic.co/t/pipeline-error-pipeline-id-main-exception-logstash-unexpected-character-code-58-expected-a-valid-value-number-string-array-object-true-false-or-null/286252>\
**Category:** Logstash\
**Created:** [October 8, 2021, 2:27pm UTC](https://discuss.elastic.co/t/pipeline-error-pipeline-id-main-exception-logstash-unexpected-character-code-58-expected-a-valid-value-number-string-array-object-true-false-or-null/286252 "2021-10-08T14:27:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Busra\_Duygu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/busra_duygu/32/90462_2.png) [@Busra\_Duygu](https://discuss.elastic.co/u/Busra_Duygu)\
**Post date:** [October 8, 2021, 2:27pm UTC](https://discuss.elastic.co/t/pipeline-error-pipeline-id-main-exception-logstash-unexpected-character-code-58-expected-a-valid-value-number-string-array-object-true-false-or-null/286252/1 "2021-10-08T14:27:14Z")

</div>

Hello friends, I want to add some data to a new index according to a query from an existing index in elasticsearch. But I am facing a problem while doing this, I would be very happy if you could help me.  
**my conf file:**

```auto
input {
  elasticsearch {
            hosts => "localhost:9200"	
            index => "my_old_index_name"
            user => "my_username"
            password => "my_password"	
            docinfo => true
            query => '"_source": ["BuyerName","ImportCountryName"] , "query": {"bool": {"must": [{"match": {"ImportCountryName": ""}},{"wildcard": {"BuyerName": {"value": "sanayi"}} , "case_insensitive":true}]}}' 
	}
}
filter { 
    mutate{
	  remove_field => ["@timestamp","@version"]
	}
    fingerprint {
        key => "my_key"
        method => "MD5"
        source => ["BuyerName"]
        target => "[@metadata][generated_id]"
    }	    
}
 
output {
    stdout { codec => dots }
     elasticsearch {
	    hosts => "localhost:9200"	
        index => "my_new_index_name"
        document_id => "%{[@metadata][generated_id]}"
		user => "my_user_name"
        password => "my_password"	
    }
}

```

Actually this query works on kibana. I checked this.

```auto
GET my_old_index_name/_search
{
  "_source": ["BuyerName","ImportCountryName"] ,
  "query": {
    "bool": {
      "must": [
        {"match": {
          "ImportCountryName": ""
        }},
        {"wildcard": {
          "BuyerName": {
            "value": "sanayi",
            "case_insensitive":true
          }
        }}
       ]
    }
  }
}

```

However, there is a problem with this query based on the error message.  
**Error Message:**

> [ERROR][logstash.javapipeline][main] Pipeline error {:pipeline\_id=\>"main", :exception=\>#\<LogStash::Json::ParserError: Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')  
> at [Source: (byte)""\_source": ["BuyerName","ImportCountryName"] , "query": {"bool": {"must": [{"match": {"ImportCountryName": ""}},{"wildcard": {"BuyerName": {"value": "sanayi"}},"case\_insensitive":true}]}}"; line: 1, column: 11]\>}

Any ideas will help me a lot thanks in advance. 🤗

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [October 8, 2021, 2:35pm UTC](https://discuss.elastic.co/t/pipeline-error-pipeline-id-main-exception-logstash-unexpected-character-code-58-expected-a-valid-value-number-string-array-object-true-false-or-null/286252/2 "2021-10-08T14:35:30Z")

</div>

> [@Busra\_Duygu](#):
>
> ```auto
> query => '"_source": ["BuyerName","ImportCountryName"] , "query": {"bool": {"must": [{"match": {"ImportCountryName": ""}},{"wildcard": {"BuyerName": {"value": "sanayi"}} , "case_insensitive":true}]}}' 
> 
> ```

Maybe putting this in curly brackets '{......}'

---

<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:** [November 5, 2021, 2:35pm UTC](https://discuss.elastic.co/t/pipeline-error-pipeline-id-main-exception-logstash-unexpected-character-code-58-expected-a-valid-value-number-string-array-object-true-false-or-null/286252/3 "2021-11-05T14:35:54Z")

</div>

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