# Find Elasticsearch Documents by JDBC input and update a field

**URL:** <https://discuss.elastic.co/t/find-elasticsearch-documents-by-jdbc-input-and-update-a-field/112006>\
**Category:** Logstash\
**Created:** [December 15, 2017, 3:26pm UTC](https://discuss.elastic.co/t/find-elasticsearch-documents-by-jdbc-input-and-update-a-field/112006 "2017-12-15T15:26:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wanna](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@wanna](https://discuss.elastic.co/u/wanna)\
**Post date:** [December 15, 2017, 3:26pm UTC](https://discuss.elastic.co/t/find-elasticsearch-documents-by-jdbc-input-and-update-a-field/112006/1 "2017-12-15T15:26:37Z")

</div>

Hi,  
i have a jdbc input with user data.

So i would like find all documents in Elasticsearch index with the user\_id of current input.  
Then i would like update field values of all the documents wich find with the user\_id.

For Example:

Row1 : {user\_id: 1, user\_name: 'xyz', location: 'xyz'}  
-\> Find all documents with user\_id 1  
-\> Update location Field to 'xyz'  
Row2...

How can i combine the jdbc input with the elastic input?

---

<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:** [January 12, 2018, 3:27pm UTC](https://discuss.elastic.co/t/find-elasticsearch-documents-by-jdbc-input-and-update-a-field/112006/2 "2018-01-12T15:27:00Z")

</div>

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