title: Search special characters with elasticsearch
body: <p>I just have problem with elasticsearch, I have some business requirement that need to search with special characters. For example, some of the query string might contain (space, @, &amp;, ^, (), !) I have some similar use case below.</p>
  
  <ol>
  <li>foo&amp;bar123 (an exact match)</li>
  <li>foo &amp; bar123 (white space between word)</li>
  <li>foobar123 (No special chars)</li>
  <li>foobar 123 (No special chars with whitespace)</li>
  <li>foo bar 123 (No special chars with whitespace between word)</li>
  <li>FOO&amp;BAR123 (Upper case)</li>
  </ol>
  
  <p>All of them should match the same results, can anyone please give me some help about this? Note this right now I can search other string with no special characters perfectly</p>
  
  <pre><code>{
      "settings": {
          "number_of_shards": 1, 
          "analysis": {
              "analyzer": {
                  "autocomplete": {
                      "tokenizer": "custom_tokenizer"
                  }
              },
              "tokenizer": {
                  "custom_tokenizer": {
                    "type": "ngram",
                    "min_gram": 2,
                    "max_gram": 30,
                    "token_chars": [
                      "letter",
                      "digit"
                    ]
                  }
            }
          }
      },
          "mappings": {
              "index": {
                  "properties": {
                      "some_field": {
                          "type": "text",
                          "analyzer": "autocomplete"
                      },
                      "some_field_2": {
                          "type": "text",
                          "analyzer": "autocomplete"
                      }
                  }
             }
      }
  }
  </code></pre>