Ngram analyzer configure with startswith logic

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"
            ]
          }
        }
        }
      }
    }
"nGram_tokenizer": {
            "type": "edge_ngram",
            "min_gram": 3,
            "max_gram": 20,
            "token_chars": [
              "letter",
              "digit"
            ]
          }

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