# Query string query "field" vs boolean OR operator

**URL:** <https://discuss.elastic.co/t/query-string-query-field-vs-boolean-or-operator/17003>\
**Category:** Elasticsearch\
**Created:** [April 14, 2014, 2:27pm UTC](https://discuss.elastic.co/t/query-string-query-field-vs-boolean-or-operator/17003 "2014-04-14T14:27:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavi\_Caballe](https://avatars.discourse-cdn.com/v4/letter/x/71e660/32.png) [@Xavi\_Caballe](https://discuss.elastic.co/u/Xavi_Caballe)\
**Post date:** [April 14, 2014, 2:27pm UTC](https://discuss.elastic.co/t/query-string-query-field-vs-boolean-or-operator/17003/1 "2014-04-14T14:27:48Z")

</div>

From what I see and understand this...

curl -XPOST '[http://localhost:9200/index\_1/type\_1/\_search](http://localhost:9200/index_1/type_1/_search)' -d '{  
"query": {  
"query\_string": {  
"fields": ["field1", "field2"],  
"query": "green apple"  
}  
}  
}'

returns the same results as this...

curl -XPOST '[http://localhost:9200/index\_1/type\_1/\_search](http://localhost:9200/index_1/type_1/_search)' -d '{  
"query": {  
"query\_string": {  
"query": "field1:(green apple) OR field2:(green apple)"  
}  
}  
}'

Which one is more efficient (faster)?

Thanks in advance,  
Xavi

--  
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/d3565291-f4d1-4fd3-8a61-2987702bff1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d3565291-f4d1-4fd3-8a61-2987702bff1e%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:35am UTC](https://discuss.elastic.co/t/query-string-query-field-vs-boolean-or-operator/17003/2 "2017-07-06T01:35:57Z")

</div>


