# Can't query by IDs using logstash-filter-elasticserach

**URL:** https://discuss.elastic.co/t/cant-query-by-ids-using-logstash-filter-elasticserach/304024
**Category:** Logstash
**Created:** [May 5, 2022, 11:15am UTC](https://discuss.elastic.co/t/cant-query-by-ids-using-logstash-filter-elasticserach/304024 "2022-05-05T11:15:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Gerard\_Purra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerard_purra/32/101266_2.png) [@Gerard\_Purra](https://discuss.elastic.co/u/Gerard_Purra)
#### Post date: [May 5, 2022, 11:15am UTC](https://discuss.elastic.co/t/cant-query-by-ids-using-logstash-filter-elasticserach/304024/1 "2022-05-05T11:15:26Z")

</div>

Hey folks,

I’m using the [logstash-filter-elasticsearch](https://github.com/logstash-plugins/logstash-filter-elasticsearch) and I’d like to query using IDs ([IDs | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html)), and I find myself unable.

Does anyone have any idea on how to work around that? The problem I’m having is that I can’t interpolate an array into the query, you can only interpolate strings...

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 5, 2022, 4:09pm UTC](https://discuss.elastic.co/t/cant-query-by-ids-using-logstash-filter-elasticserach/304024/2 "2022-05-05T16:09:11Z")

</div>

In the end, what gets sent in the HTTP request to Elasticsearch _is_ a string, so the question is: what form is your data currently in, and what string to you want to convert that to so that you can interpolate it?

---

<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 2, 2022, 4:09pm UTC](https://discuss.elastic.co/t/cant-query-by-ids-using-logstash-filter-elasticserach/304024/3 "2022-06-02T16:09:31Z")

</div>

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