# Part of (message) field to new field - how?

**URL:** <https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212>\
**Category:** Elasticsearch\
**Created:** [January 30, 2020, 2:39pm UTC](https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212 "2020-01-30T14:39:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tommie](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@Tommie](https://discuss.elastic.co/u/Tommie)\
**Post date:** [January 30, 2020, 2:39pm UTC](https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212/1 "2020-01-30T14:39:17Z")

</div>

There's an index with (message) fields like:  
selection xyz finished. elapsed\_millis: 73, rows=4  
selection shorter finished. elapsed\_millis: 165, rows=454  
selection another finished. elapsed\_millis: 9999, rows=0

Is it possible to select the value after the 'elapsed\_millis:' and store it in a new (number) field?  
And the same question for the rows value.

Any help is welcome.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 30, 2020, 2:48pm UTC](https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212/2 "2020-01-30T14:48:05Z")

</div>

Take a look at the [reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-reindex.html) in combination with a pipeline that uses a [grok processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/grok-processor.html) to extract that value from the field into it's own field and thus making it searchable and storing it as a number.

hope this helps!

---

<div class="post-metadata">

**Author:** ![Tommie](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@Tommie](https://discuss.elastic.co/u/Tommie)\
**Post date:** [January 31, 2020, 1:32pm UTC](https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212/3 "2020-01-31T13:32:33Z")

</div>

Thank you spinscale!

I've deleted the index and reloaded my data with a grok statements in the filter with success!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 28, 2020, 1:44pm UTC](https://discuss.elastic.co/t/part-of-message-field-to-new-field-how/217212/4 "2020-02-28T13:44:04Z")

</div>

Closed on February 28, 2020, 1:44pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
