elasticsearch search with/without spaces -


good day, created searchable index based on phonetics (in example 2 fields: indexing on metaphone , ngram). how configure index not take account gaps in sentences this: "4gb" , "4 gb"?

put product_name {    "settings": {       "index": {          "number_of_shards": 1,          "number_of_replicas": 0,          "analysis": {             "analyzer": {                "ngram_index": {                   "tokenizer": "standard",                   "filter": [                      "standard",                      "lowercase",                      "index_ngram",                      "stopwords",                      "synonym"                   ]                },                  "meta_index": {                     "filter":["standard","lowercase","my_metaphone","stopwords", "synonym"],                       "type":"custom",                       "tokenizer":"standard"                 }             },             "filter": {                "index_ngram": {                   "type": "ngram",                   "min_gram": 3,                   "max_gram": 15                },                     "my_metaphone" : {                     "type" : "phonetic",                     "encoder" : "metaphone",                     "replace" : true                 },                "synonym" : {                     "type" : "synonym",                     "synonyms" : [                                                     "i-pod, pod => ipod",                         "universe, cosmos",                         "1, i, i",                         "2, ii, ii",                         "3, iii, iii",                         "4, iv, iv",                         "5, v, v",                         "6, vi, vi",                         "7, vii, vii",                         "8, viii, viii",                         "9, ix, ix",                         "10, x, x",                         "s4, siv",                         "4 gb, 4gb"                      ]                 },                "stopwords": {                   "type": "stop",                   "stopwords": "algúnalguna, algunasЭ                }             }          }       }    },    "mappings": {       "products": {          "properties": {             "name": {                "type": "multi_field",                "fields": {                   "name": {                      "type": "string"                   },                   "ngram_name": {                       "type": "string",                      "index_analyzer": "ngram_index",                      "search_analyzer": "ngram_index"                   },                   "meta_name": {                       "type": "string",                      "index_analyzer": "meta_index",                      "search_analyzer": "meta_index"                   }                }             }          }       }    } } 


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -