# Query template not found by Logstash

**URL:** <https://discuss.elastic.co/t/query-template-not-found-by-logstash/233736>\
**Category:** Logstash\
**Created:** [May 21, 2020, 12:30pm UTC](https://discuss.elastic.co/t/query-template-not-found-by-logstash/233736 "2020-05-21T12:30:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mielsi30](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@mielsi30](https://discuss.elastic.co/u/mielsi30)\
**Post date:** [May 21, 2020, 12:30pm UTC](https://discuss.elastic.co/t/query-template-not-found-by-logstash/233736/1 "2020-05-21T12:30:41Z")

</div>

Hello,  
I am using a .conf file which uses the elasticsearch filter to query an index and enrich the documents coming in. I am using a query template called `search_by_title.json` which is stored in the same directory as the .conf file.

```auto
    elasticsearch {
            hosts => ["localhost:9200"]
            index => "feeds"
            query_template => "${PATH_TO_DIR}/search_by_title.json"
            fields => { 
                    "type" => "type"
                }
        }

```

Additionally I have other pipelines running, so I added them to the `pipelines.yml` file in my logstash directory as shown below:

```auto
    - pipeline.id: pipeline_1
      path.config: "${PATH_TO_DIR}/conf1.conf"
    - pipeline.id: pipeline_2
      path.config: "${PATH_TO_DIR}/conf2.conf"

```

Logstash doesn't seem to find the `search_by_title.json` file which is used by the conf2.conf file and shows the following message:

`Pipeline aborted due to error {:pipeline_id=>"pipeline_4", :exception=>#<Errno::ENOENT: No such file or directory - search_by_title.json>`

I tried adding the full path and copying the file to the same logstash directory to no avail.  
Would greatly appreciate it if anybody has some insights that could help me.

Thanks!

---

<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 18, 2020, 12:30pm UTC](https://discuss.elastic.co/t/query-template-not-found-by-logstash/233736/2 "2020-06-18T12:30:48Z")

</div>

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