title: Elasticsearch: Search in keywords ignoring case and accent (via aggregation)
body: <p>I can search for specific keywords on indexes like this:</p>
  
  <pre><code>GET */_search/?
  {
    "query": {
      "match_all": {}
    },
    "size": 0,
    "aggs": {
      "TECH.keyword": {
        "terms": {
          "field": "TECH.keyword",
          "include": ".*mine.*",
          "order": {
            "_count": "desc"
          },
          "size": 20
        }
      }
    }
  }
  </code></pre>
  
  <p>Using this query, I can get all entries that have "mine" in their <code>TECH.keyword</code> fields, ordered by <code>"_count": "desc"</code>. So, it's OK.</p>
  
  <p>The actual problem is that the index can contain <code>mine</code>, <code>Mine</code> or <code>MINE</code> or even <code>miné</code> in <code>TECH.keyword</code> fields. And I would like to return them all.</p>
  
  <p>Is there a way to search in keywords ignoring case and accent?</p>
  
  <p>The current mapping is: </p>
  
  <pre><code>"TECH": {
    "type": "text",
    "fields": {
      "keyword": {
        "type": "keyword",
        "ignore_above": 256
      }
    }
  },
  </code></pre>