title: Can't get email field to index correctly in ElasticSearch
body: <p>I am trying to setup an email field to index correctly in my mapping.</p>
  
  <p>Because I do not want <strong>email</strong> to be tokenized when it is indexed, I have previously specified the following mapping to allow it to only match search when the entire string matches.</p>
  
  <pre><code>{
    "users": {
      "mappings": {
        "user": {
          "properties": {
            "email": {
              "type": "string",
              "index": "not_analyzed"
            },
            "name": {
              "type": "string",
              "fields": {
                "raw": {
                  "type": "string",
                  "index": "not_analyzed"
                }
              }
            },
            "nickname": {
              "type": "string"
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>This works except that I want the <strong>email</strong> and <strong>nickname</strong> field to be compared as lowercase.</p>
  
  <p>I have tried several ways to specify to change the mapping to use the lowercase token filter.</p>
  
  <p>I have done this with the following:</p>
  
  <pre><code>{
    "settings":{
      "index":{
        "analysis":{
          "analyzer":{
            "lowercase_analyzer":{
              "tokenizer":"standard", //Also tried 'Simple' and 'Keyword'
              "filter":"lowercase"
            }
          }
        }
      }
    },
  
    "mappings": {
      "user": {
        "properties": {
          "email": {
            "type": "string",
            "analyzer":"lowercase_analyzer",
            "index": "not_analyzed" //Tried with and without this
          },
          "name": {
            "type": "string",
            "analyzer":"lowercase_analyzer",
            "fields": {
              "raw": {
                "type": "string",
                "index": "not_analyzed"
              }
            }
          },
          "nickname": {
            "type": "string",
            "analyzer": "lowercase_analyzer"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>My hope is to allow the following behavior:</p>
  
  <ul>
  <li>email can be searched and compared as lowercase and should only match if whole email matches</li>
  <li>name is a multi-field used for search and sorting and uses lowercase</li>
  <li>nickname is compared lowercase</li>
  </ul>