# Is it necessary to copy synonym.txt to all nodes?

**URL:** <https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746>\
**Category:** Elasticsearch\
**Created:** [June 2, 2021, 12:11pm UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746 "2021-06-02T12:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsan\_kabiri\_33](https://avatars.discourse-cdn.com/v4/letter/e/b77776/32.png) [@ehsan\_kabiri\_33](https://discuss.elastic.co/u/ehsan_kabiri_33)\
**Post date:** [June 2, 2021, 12:11pm UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746/1 "2021-06-02T12:11:48Z")

</div>

I have a cluster of 3 nodes. My index is located on node-2 (primary shard) and node-3 (replica shard) and node-1 is currently master...Anyway, I have my own `synonym.txt` and I need to know that, should I have to copy my config (`synonym.txt`) to all the masters , and all of the data nodes?  
Or only data nodes?

Another question: if `synonym.txt` is being to be used just during mapping the index (I mean creating documents ) and is not required when searching/query the index, so again I ask, should I have to copy the `synonym.txt` to all master, replica and primary nodes or only on the node which primary-shard is located on is sufficient?

I can get my answer using try/error, but I need to know the global rule.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 3, 2021, 12:05am UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746/2 "2021-06-03T00:05:40Z")

</div>

It needs to be on any node that holds an index.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [June 3, 2021, 8:30am UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746/3 "2021-06-03T08:30:29Z")

</div>

> [@warkolm](#):
>
> It needs to be on any node that holds an index.

That is true, but since indices might be relocated to other nodes it needs to be on every node that can contain data (so every data node)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 7, 2021, 1:04am UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746/4 "2021-06-07T01:04:38Z")

</div>

Yep true, that's what I was implying.

---

<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:** [July 5, 2021, 1:05am UTC](https://discuss.elastic.co/t/is-it-necessary-to-copy-synonym-txt-to-all-nodes/274746/5 "2021-07-05T01:05:31Z")

</div>

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