title: Elasticsearch edgeNGram analyzer/tokenizer fuzzy query matching
body: <p>We have an Accounts table that we are searching for similar records using fuzzy query with edgeNGram analyzer for multiple fields. Our setup:</p>
  
  <p><strong>Settings</strong></p>
  
  <pre><code>{
    settings: {
      analysis: {
        analyzer: {
          edge_n_gram_analyzer: {
            tokenizer: "whitespace",
            filter: ["lowercase",  "ednge_gram_filter"]
          }
        },
        filter: {
          ednge_gram_filter: {
            type: "edgeNGram",
            min_gram: 2,
            max_gram: 10
          }
        }
      }
    }
  }
  </code></pre>
  
  <p><strong>Mapping</strong></p>
  
  <pre><code>{
    mappings: {
      document_type: {
        properties: {
          uid: {
            type: "text",
            analyzer: "edge_n_gram_analyzer"
          },
          shop_name: {
            type: "text",
            analyzer: "edge_n_gram_analyzer"
          },
          seller_name: {
            type: "text",
            analyzer: "edge_n_gram_analyzer"
          },
          ...
          ...
          ...
          locale_id: {
            type: "integer"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p><strong>Query</strong></p>
  
  <pre><code>{
    body: {
      query: {
        bool: {
          must: [
            {
              bool: {
                should: [
                  {
                    fuzzy: {
                      uid: {
                        value: "antonline",
                        boost: 1.0,
                        fuzziness: 2,
                        prefix_length: 0,
                        max_expansions: 100
                      }
                    }
                  },
                  {
                    fuzzy: {
                      seller_name: {
                        value: "antonline",
                        boost: 1.0,
                        fuzziness: 2,
                        prefix_length: 0,
                        max_expansions: 100
                      }
                    }
                  },
                  {
                    fuzzy: {
                      shop_name: {
                        value: "antonline",
                        boost: 1.0,
                        fuzziness: 2,
                        prefix_length: 0,
                        max_expansions: 100
                      }
                    }
                  }
                ]
              }
            }
          ],
          must_not: [
            {
              term: {
                locale_id: {
                  value: 7
                }
              }
            }
          ]
        }
      }
    }
  }
  </code></pre>
  
  <p>The above example finds different variations of 'antonline' string such as <i>"antonline", "sanjonline", "tanonline", "kotonline", "htonline", "awmonline"</i>. However, it doesn't match strings with punctuation like <i>antonline.com</i> or even <i>antonlinecom</i> without the dot. We tried different types of tokenizers but nothing helps.</p>
  
  <p>How could we achieve the search result as we expect?</p>