# Use DSL query to find out whether a file has a fixed value?

**URL:** <https://discuss.elastic.co/t/use-dsl-query-to-find-out-whether-a-file-has-a-fixed-value/118766>\
**Category:** Elasticsearch\
**Created:** [February 7, 2018, 7:16am UTC](https://discuss.elastic.co/t/use-dsl-query-to-find-out-whether-a-file-has-a-fixed-value/118766 "2018-02-07T07:16:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham\_kumar1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shubham_kumar1/32/22084_2.png) [@shubham\_kumar1](https://discuss.elastic.co/u/shubham_kumar1)\
**Post date:** [February 7, 2018, 7:16am UTC](https://discuss.elastic.co/t/use-dsl-query-to-find-out-whether-a-file-has-a-fixed-value/118766/1 "2018-02-07T07:16:50Z")

</div>

Hi all,  
I have to check for a field in elasticsearch that whether it contains particular value or not.  
Suppose there are multiple files with entries:-  
1:-message - request for connection  
2:- message- response for connection  
now i want a separate out the file which have 1st message but does not have the 2nd message.  
I have ingested all the file content to elasticsearch , now i want write a DSL query which can help me achieving it.  
Thanks in advance

---

<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:** [March 7, 2018, 7:17am UTC](https://discuss.elastic.co/t/use-dsl-query-to-find-out-whether-a-file-has-a-fixed-value/118766/2 "2018-03-07T07:17:05Z")

</div>

Closed on March 7, 2018, 7:17am UTC

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