# How to Analyze field with elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143>\
**Category:** Elasticsearch\
**Created:** [December 9, 2020, 3:12pm UTC](https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143 "2020-12-09T15:12:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![111417](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111417/32/80508_2.png) [@111417](https://discuss.elastic.co/u/111417)\
**Post date:** [December 9, 2020, 3:12pm UTC](https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143/1 "2020-12-09T15:12:30Z")

</div>

I want to parse field with spacial format (like Json) with using elasticsearch without logstash , is that possible with using elasticsearch analyze?

If it's possible,where can i start?  
Or there is another way?

example :  
before parse

{ 'timestamp' : 2020-12-9,  
'message' : {'a':3,'b':4}  
}

after :  
{'timestampe' :2020-12-9,  
message :{'a':3,'b':4}  
'a' : 3,  
'b' : 4,}

thank you!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 9, 2020, 3:31pm UTC](https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143/2 "2020-12-09T15:31:19Z")

</div>

Welcome!

You can use the [ingest pipeline feature](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/ingest.html).

For example, based on this documentation:

> **[Set processor | Elasticsearch Reference \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/set-processor.html)**

You can write

```auto
PUT _ingest/pipeline/extract_message
{
  "processors": [
    {
      "set": {
        "field": "a",
        "value": "{{message.a}}"
      }
    },
    {
      "set": {
        "field": "b",
        "value": "{{message.b}}"
      }
    }
  ]
}

PUT index/_doc/1?pipeline=extract_message
{
  "message": {
    "a":3,
    "b":4
  }
}
GET index/_doc/1

```

That should work.

---

<div class="post-metadata">

**Author:** ![111417](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111417/32/80508_2.png) [@111417](https://discuss.elastic.co/u/111417)\
**Post date:** [December 9, 2020, 3:48pm UTC](https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143/3 "2020-12-09T15:48:46Z")

</div>

Thanks for your reply !!  
Really helped me a lot !!

---

<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:** [January 6, 2021, 3:48pm UTC](https://discuss.elastic.co/t/how-to-analyze-field-with-elasticsearch/258143/4 "2021-01-06T15:48:47Z")

</div>

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