title: Elasticsearch index search for currency $ and £ signs
body: <p>In some of my documents I have $ or £ symbols. I want to search for £ and retrieve documents containing that symbol. I've gone through <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/custom-analyzers.html" rel="nofollow">the documentation</a> but I'm getting some cognitive dissonance.</p>
  
  <pre><code># Delete the `my_index` index
  DELETE /my_index    
  
  # Create a custom analyzer
  PUT /my_index
  {
    "settings": {
      "analysis": {
        "char_filter": {
          "&amp;_to_and": {
            "type": "mapping",
            "mappings": [
              "&amp;=&gt; and ",
              "$=&gt; dollar "
            ]
          }
        },
        "analyzer": {
          "my_analyzer": {
            "type": "custom",
            "char_filter": [
              "html_strip",
              "&amp;_to_and"
            ],
            "tokenizer": "standard",
            "filter": [
              "lowercase"
            ]
          }
        }
      }
    }
  }    
  </code></pre>
  
  <p>This returns "the", "quick", "and", "brown", "fox" just as the documentation states:</p>
  
  <pre><code># Test out the new analyzer
  GET /my_index/_analyze?analyzer=my_analyzer&amp;text=The%20quick%20%26%20brown%20fox    
  </code></pre>
  
  <p>This returns "the", "quick", "dollar", "brown", "fox"</p>
  
  <pre><code>GET /my_index/_analyze?analyzer=my_analyzer&amp;text=The%20quick%20%24%20brown%20fox    
  </code></pre>
  
  <p>Adding some records:  </p>
  
  <pre><code>PUT /my_index/test/1
  {
    "title": "The quick &amp; fast fox"
  }    
  
  PUT /my_index/test/1
  {
    "title": "The daft fox owes me $100"
  }    
  </code></pre>
  
  <p>I would have thought if I search for "dollar", I would get a result? Instead I get no results:</p>
  
  <pre><code>GET /my_index/test/_search
  { "query": {
      "simple_query_string": {
        "query": "dollar"
      }
    }
  }
  </code></pre>
  
  <p>Or even using '$' with an analyzer:</p>
  
  <pre><code>GET /my_index/test/_search
  { "query": {
    "query_string": {
      "query": "dollar10",
      "analyzer": "my_analyzer"
    }
   }
  }
  </code></pre>