# How to use DSL to drill down query string message body

**URL:** <https://discuss.elastic.co/t/how-to-use-dsl-to-drill-down-query-string-message-body/138819>\
**Category:** Kibana\
**Created:** [July 6, 2018, 3:23am UTC](https://discuss.elastic.co/t/how-to-use-dsl-to-drill-down-query-string-message-body/138819 "2018-07-06T03:23:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![divine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divine/32/33036_2.png) [@divine](https://discuss.elastic.co/u/divine)\
**Post date:** [July 6, 2018, 3:23am UTC](https://discuss.elastic.co/t/how-to-use-dsl-to-drill-down-query-string-message-body/138819/1 "2018-07-06T03:23:54Z")

</div>

Hello guys, I am new here an fairly new to actually using Kibana for searching data and creating visualization board.

I am tasked to Query logs to find out is a sessionID is in plaintext, I am running into problem creating a query that will do just that.

As the sessionID is located in a field called message which has numerous of fields.

The first thing i need to do is to get a handle on the sessionID field in the message body then I need to check if the field is Plaintext vs Ciphertext which also poses a problem.

1. How do I drilled down to match a specific field with a message body ?
2. How would a check the value to see if the value is displaying plaintext ?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [July 9, 2018, 12:15pm UTC](https://discuss.elastic.co/t/how-to-use-dsl-to-drill-down-query-string-message-body/138819/2 "2018-07-09T12:15:43Z")

</div>

Hey @divine, how are you currently ingesting your data into Elasticsearch? Generally, you'll want to extract the these fields on ingest time, and perform any computationally complex calculations then.

If re-ingesting your data isn't possible, you can use Kibana [scripted fields](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) to do so on query time.

---

<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:** [August 6, 2018, 12:15pm UTC](https://discuss.elastic.co/t/how-to-use-dsl-to-drill-down-query-string-message-body/138819/3 "2018-08-06T12:15:46Z")

</div>

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