title: Elasticsearch lowercase filter search
body: <p>I'm trying to search my database and be able to use upper/lower case filter terms but I've noticed while <code>query</code>'s apply analyzers, I can't figure out how to apply a lowercase analyzer on a filtered search. Here's the query:</p>
  
  <pre><code>{
      "query": {
          "filtered": {
              "filter": {
                  "bool": {
                      "should": [
                          {
                              "term": {
                                  "language": "mandarin" // Returns a doc
                              }
                          },
                          {
                              "term": {
                                  "language": "Italian" // Does NOT return a doc, but will if lowercased
                              }
                          }
                      ]
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I have a type <code>languages</code> that I have lowercased using:</p>
  
  <pre><code>"analyzer": {
      "lower_keyword": {
          "type": "custom",
          "tokenizer": "keyword",
          "filter": "lowercase"
      }
  }
  </code></pre>
  
  <p>and a corresponding mapping:</p>
  
  <pre><code>"mappings": {
      "languages": {
          "_id": {
              "path": "languageID"
          },
          "properties": {
              "languageID": {
                  "type": "integer"
              },
              "language": {
                  "type": "string",
                  "analyzer": "lower_keyword"
              },
              "native": {
                  "type": "string",
                  "analyzer": "keyword"
              },
              "meta": {
                  "type": "nested"
              },
              "language_suggest": {
                  "type": "completion"
              }
          }
      }
  }
  </code></pre>