# How to add search\_type in settings

**URL:** <https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717>\
**Category:** Elasticsearch\
**Created:** [September 19, 2022, 5:49pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717 "2022-09-19T17:49:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashantreddy](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@prashantreddy](https://discuss.elastic.co/u/prashantreddy)\
**Post date:** [September 19, 2022, 5:49pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/1 "2022-09-19T17:49:00Z")

</div>

Hello,

I am pretty new to ES and i use templates for search. we have separate settings file to add analyzers and all. I am trying to add search\_type in same file. is it possible to add search\_type in settings file?

i tried "index.routing.search\_type:dfs\_query\_then\_fetch" or "search\_type:dfs\_query\_then\_fetch" but nothing worked.

thanks,

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [September 19, 2022, 7:05pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/2 "2022-09-19T19:05:45Z")

</div>

Hi @prashantreddy

The search\_type is a parameter [Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html#search-search-api-query-params).

---

<div class="post-metadata">

**Author:** ![prashantreddy](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@prashantreddy](https://discuss.elastic.co/u/prashantreddy)\
**Post date:** [September 20, 2022, 4:02pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/3 "2022-09-20T16:02:30Z")

</div>

so i should send as a parameter and cannot be added in settings?

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [September 20, 2022, 5:06pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/4 "2022-09-20T17:06:04Z")

</div>

> [@prashantreddy](#):
>
> so i should send as a parameter and cannot be added in settings?

Yes, you should use as query parameter.

---

<div class="post-metadata">

**Author:** ![prashantreddy](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@prashantreddy](https://discuss.elastic.co/u/prashantreddy)\
**Post date:** [September 27, 2022, 6:46pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/5 "2022-09-27T18:46:49Z")

</div>

Thanks, i added it as a parameter it works.

---

<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:** [October 25, 2022, 6:47pm UTC](https://discuss.elastic.co/t/how-to-add-search-type-in-settings/314717/6 "2022-10-25T18:47:09Z")

</div>

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