Hello everyone..
Currently i am using ngram analyzer which is analyzing text like that way:
forinstance: Apple iPhone -> app, appl, apple, ppl, pple,ple,iph,ipho,hone and so on.
But I want it to create tokens like this:
Apple Iphone-> app, appl apple, iph, ipho,iphon,iphone
Index Settings
PUT index
{
"settings": {
"index": {
"max_ngram_diff": 50
},
"analysis": {
"filter": {
"custom_shingle": {
"max_shingle_size": "2",
"min_shingle_size": "2",
"output_unigrams": true,
"type": "shingle"
},
"my_char_filter": {
"pattern": " ",
"type": "pattern_replace",
"replacement": ""
}
},
"analyzer": {
"nGram_analyzer": {
"filter": [
"lowercase"
],
"tokenizer": "nGram_tokenizer"
},
"bigram_analyzer": {
"filter": [
"lowercase",
"custom_shingle",
"my_char_filter"
],
"tokenizer": "standard"
}
},
"tokenizer": {
"nGram_tokenizer": {
"type": "ngram",
"min_gram": 3,
"max_gram": 20,
"token_chars": [
"letter",
"digit"
]
}
}
}
}
}