# Synonyms with FSCrawler

**URL:** <https://discuss.elastic.co/t/synonyms-with-fscrawler/223234>\
**Category:** Elasticsearch\
**Created:** [March 12, 2020, 1:53am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234 "2020-03-12T01:53:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [March 12, 2020, 1:53am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/1 "2020-03-12T01:53:40Z")

</div>

Hi I am trying to integrate the synonyms search when i use FSCrawler, i have tried changing the variables in `~/.fscrawler/_default/7/_settings.json` but to no avail. Any pointers on how to get it working?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 12, 2020, 3:20am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/2 "2020-03-12T03:20:17Z")

</div>

Did you then remove the existing index and restart FSCrawler with the `--restart` option?

What exact steps you did?

Did you check that the mapping has been applied?

---

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [March 12, 2020, 3:39am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/3 "2020-03-12T03:39:41Z")

</div>

Think I got it running already, although the results aren't pretty... But I'll leave what i edited here for future references.

I have edited the \_settings.json at the analysis portion

```auto
...
	  "analysis": {
			"filter": {
				"synonym_filter": {
					"type": "synonym",
					"synonyms": [
						"ORIGINAL, SYNONYM#1, SYNONYM#2"
					]		
				}
			},
	    "analyzer": {
				"synonym_analyzer": {
					"tokenizer": "standard",
					"filter": ["lowercase", "synonym_filter"]
				},
...

```

and the mapping portion, dependent on which string you want to do the synonym search

```auto
...
      "content": {
				"type": "text",
				"analyzer": "synonym_analyzer"
      },
...

```

Hope this helps the rest trying synonyms search on FSCrawler.

---

<div class="post-metadata">

**Author:** ![richylyq](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@richylyq](https://discuss.elastic.co/u/richylyq)\
**Post date:** [March 25, 2020, 8:38am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/5 "2020-03-25T08:38:24Z")

</div>

@dadoonet Can I clarify that I have to keep removing the existing index and restart FSCrawler with the `--restart` option whenever i update my synonym filter?  
If I want my system to be as real time as possible, this updating of synonyms will cause my index to not be real time anymore as I will delete my index every time i have to update the synonyms

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2020, 10:02am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/6 "2020-03-25T10:02:33Z")

</div>

It's not then a FSCrawler issue but an elasticsearch problem.

There are new options for synonyms since 7.3. Have a look at [https://www.elastic.co/blog/boosting-the-power-of-elasticsearch-with-synonyms](https://www.elastic.co/blog/boosting-the-power-of-elasticsearch-with-synonyms)

---

<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:** [April 22, 2020, 10:02am UTC](https://discuss.elastic.co/t/synonyms-with-fscrawler/223234/7 "2020-04-22T10:02:33Z")

</div>

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