# Complex Query

**URL:** <https://discuss.elastic.co/t/complex-query/16444>\
**Category:** Elasticsearch\
**Created:** [March 19, 2014, 1:40am UTC](https://discuss.elastic.co/t/complex-query/16444 "2014-03-19T01:40:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yogesh\_Shetty](https://avatars.discourse-cdn.com/v4/letter/y/7cd45c/32.png) [@Yogesh\_Shetty](https://discuss.elastic.co/u/Yogesh_Shetty)\
**Post date:** [March 19, 2014, 1:40am UTC](https://discuss.elastic.co/t/complex-query/16444/1 "2014-03-19T01:40:48Z")

</div>

I recently downloaded and started exploring elasticsearch and went through  
search api, I am still trying to figure out what is the best way to phrase  
this complex query for eg. what will be the elastic search query look like  
for below conditional operators.

(Source = "Crystal" and ReportName = "BOLI.rpt") Or  
( (ParameterName = "EffDate" And FieldName = "SourceId") Or  
(ParameterName = "Type" and FieldName = "Cusip" ) )

Do i need to take filter route? or can this be done using query

thanks in advance

Cheers  
Yogesh

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cc1dcfb6-0fd5-4999-8399-be6e10ae4bc1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc1dcfb6-0fd5-4999-8399-be6e10ae4bc1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:42am UTC](https://discuss.elastic.co/t/complex-query/16444/2 "2017-07-06T01:42:21Z")

</div>


