title: "Distinct on substring" query in Kibana 4
body: <p>I would like to know how can I get a "distinct on substring" query in Kibana 4.</p>
  
  <p>For example, I would to group "message" by a subsequence, such as this :</p>
  
  <p>Row logs:</p>
  
  <pre><code>Timestamp  | Level | Message
  2015-03-31 | ERROR | Something is wrong
  2015-03-31 | ERROR | Something is still wrong
  2015-03-31 | INFO  | Problem seams to be fixed
  2015-03-31 | WARN  | There may be a problem
  </code></pre>
  
  <p>The expected result would be:</p>
  
  <pre><code>wrong:   2
  problem: 2
  fixed:   1
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance.</p>