Abbreviation Search not working as expected

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?

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

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.

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