Kibana: pie chart slices based on substring of a field
<p>I'm trying to create a pie chart visualization that will display the top 10 incoming requests.
I have a search query that filters only the incoming requests which have a field called messages which looks like the following:
"Incoming request /api/someaction".
How do I do the aggregation based on the /api/someaction part rather on the entire string (because then "Incoming" is counted as a term".</p>

<p>Or...can I create custom field which are, for example, a substring of another field?</p>

<p>Thanks</p>