Query string query "field" vs boolean OR operator


(Xavi Caballé) #1

From what I see and understand this...

curl -XPOST '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' -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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d3565291-f4d1-4fd3-8a61-2987702bff1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2