# Querying

**URL:** <https://discuss.elastic.co/t/querying/121763>\
**Category:** Elasticsearch\
**Created:** [February 28, 2018, 1:55am UTC](https://discuss.elastic.co/t/querying/121763 "2018-02-28T01:55:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmgarcia](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@jmgarcia](https://discuss.elastic.co/u/jmgarcia)\
**Post date:** [February 28, 2018, 1:55am UTC](https://discuss.elastic.co/t/querying/121763/1 "2018-02-28T01:55:11Z")

</div>

Hey fellas,

I have been doing my best refraining from posting on here because I am pretty sure somebody else has solved this problem or has had similar issues and fixed it with Google. Unfortunately I am not that good and am struggling so please, any help would be appreciated!

I have a bunch of queries in string form I need to check against Elasticsearch, They are something like this "((device: foo1 AND device: foo2) OR port :123)". There are hundreds of strings like this in dozens of text files that I need to use. I wrote a python script to print all of the strings out but not sure if I need to filter them more in order to search. My code is something like this:

curl -XGET localhost:9200/\_search{string}.

The biggest issue is IF there is a hit on the string I need to pull out things like src\_ip, dest\_ip, application, etc, etc, etc.

I have the gui Kibana installed and if I copy and paste the strings I have from the text files, they work. Anybody have any suggestions on the best way to do this? I am decent with python but I am lost on this project.

---

<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 28, 2018, 1:55am UTC](https://discuss.elastic.co/t/querying/121763/2 "2018-03-28T01:55:40Z")

</div>

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