# Abbreviation Search not working as expected

**URL:** <https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361>\
**Category:** Elasticsearch\
**Created:** [September 6, 2019, 7:34am UTC](https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361 "2019-09-06T07:34:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuruPrasath\_Ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guruprasath_ramesh/32/45714_2.png) [@GuruPrasath\_Ramesh](https://discuss.elastic.co/u/GuruPrasath_Ramesh)\
**Post date:** [September 6, 2019, 7:34am UTC](https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361/1 "2019-09-06T07:34:53Z")

</div>

Hi there,

I have a condition, if I search with either reg A or regulation A, it should return the documents which contain both reg A and regulation A as results. For which, I have used the synonym filter, but it is not working as expected.

And my mapping is,

```
{
  "guru" : {
	"settings" : {
	  "index" : {
	    "number_of_shards" : "1",
	    "provided_name" : "guru",
	    "creation_date" : "1567754848669",
	    "analysis" : {
	      "filter" : {
	        "my_ascii_folding" : {
	          "type" : "asciifolding",
	          "preserve_original" : "true"
	        },
	        "synonym" : {
	          "type" : "synonym",
	          "expand" : "true",
	          "synonyms" : [
	            "reg=> regulation"
	          ]
	        }
	      },
	      "analyzer" : {
	        "folding" : {
	          "filter" : [
	            "lowercase",
	            "my_ascii_folding",
	            "synonym"
	          ],
	          "type" : "standard",
	          "tokenizer" : "standard"
	        }
	      }
	    },
	    "number_of_replicas" : "1",
	    "uuid" : "HmcBL7tlSqaeILuYvE20HQ",
	    "version" : {
	      "created" : "7030199"
	    }
	  }
	}
  }
}

```

Any solutions?

Hey, @Andrei_Stefan you have any ideas?

---

<div class="post-metadata">

**Author:** ![GuruPrasath\_Ramesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guruprasath_ramesh/32/45714_2.png) [@GuruPrasath\_Ramesh](https://discuss.elastic.co/u/GuruPrasath_Ramesh)\
**Post date:** [September 9, 2019, 5:27am UTC](https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361/2 "2019-09-09T05:27:05Z")

</div>

Any replies? It would be good if anybody helps me for getting the solution

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 9, 2019, 5:46am UTC](https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361/3 "2019-09-09T05:46:38Z")

</div>

> [@GuruPrasath\_Ramesh](#):
>
> For which, I have used the synonym filter, but it is not working as expected.

You have not explained exactly HOW it is not working as expected so i do not see how anyone can help you. Plesae provide a detailed description and a full recreation script that can be run from the Kibana dev tools console.

This forum is manned by volunteers, so please do not ping people not already involved in the thread.

---

<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 7, 2019, 6:54am UTC](https://discuss.elastic.co/t/abbreviation-search-not-working-as-expected/198361/5 "2019-10-07T06:54:01Z")

</div>

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