Create script-field and aggregate+filter+bucket on that

Hi,

I have a complex _uid, which can be used in aggregations.

The _uid is like:

type#var1:var2:var3:var4

Is it possible to use a script (or something else), so I move each "var(x)" into a separate field, and use them for filtering, aggregating (top "var1" values), basically just use them like you would use a normal field.

Thank You

Extracting data from one field into other fields at index time will be made possible by the upcoming ingest functionality (see https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html ). An index-time alternative is to use Logstash.
The simplest solution might just be to properly index the information that is now contained in the _uid field.

I don't need for index-time, I needed for query-time, to lower the storage and duplicate indexes.