# Multiple Synonym Lists?

**URL:** <https://discuss.elastic.co/t/multiple-synonym-lists/26493>\
**Category:** Elasticsearch\
**Created:** [July 29, 2015, 2:45pm UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493 "2015-07-29T14:45:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronchalant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronchalant/32/3611_2.png) [@ronchalant](https://discuss.elastic.co/u/ronchalant)\
**Post date:** [July 29, 2015, 2:45pm UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493/1 "2015-07-29T14:45:51Z")

</div>

We're currently on 1.6 with plans to move to 1.7 soon.

We want to incorporate a synonym token filter, but I was hoping to have a combination of sources - for example using the Wordnet synonym file as a baseline (english) and then providing some synonyms in a separate file that are unique to our business.

I have not been able to find any documentation for this sort of configuration, is the above possible?

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [July 29, 2015, 2:50pm UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493/2 "2015-07-29T14:50:01Z")

</div>

The synonym token filter takes only a single file in the `synonym_path` parameter. I guess you could create an analyzer with multiple synonym token filters, each one pointing to a different path.

---

<div class="post-metadata">

**Author:** ![ronchalant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronchalant/32/3611_2.png) [@ronchalant](https://discuss.elastic.co/u/ronchalant)\
**Post date:** [July 29, 2015, 4:43pm UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493/3 "2015-07-29T16:43:24Z")

</div>

Thanks Colin. I'm a bit new still to elasticsearch, can I associate multiple token filters with my mapping? That seems like it might cause a lot of different terms to be indexed.

Or maybe I can just export the Wordnet synonym into a text file then manually edit/add the ones that I need?

I'll investigate a bit more, thanks

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [July 30, 2015, 8:13am UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493/4 "2015-07-30T08:13:30Z")

</div>

> [@ronchalant](#):
>
> can I associate multiple token filters with my mapping?

yep have a look at the following bit of the documentation for an example: [Create a custom analyzer | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html)

> [@ronchalant](#):
>
> That seems like it might cause a lot of different terms to be indexed.

right, so there are problems with using large synonym dictionaries (even if you just use one synonym filter). Have a look at this chapter of the Elasticsearch: The Definitive Guide book for more information on the advantages and disadvantages (including the sub pages on the right hand menu: [Synonyms | Elasticsearch: The Definitive Guide [2.x] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/current/synonyms.html)

> [@ronchalant](#):
>
> Or maybe I can just export the Wordnet synonym into a text file then manually edit/add the ones that I need?

Yes, usually this is the best approach, see which synonyms you actually need and add them manually to keep the number of synonyms fairly low

---

<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, 2017, 11:58pm UTC](https://discuss.elastic.co/t/multiple-synonym-lists/26493/5 "2017-07-05T23:58:10Z")

</div>


