Which kind of query style is recommanded to use, JSON style or Query_string sytel? Performance differes?

I am new to use Elasticsearch + Logstash + Kibana for analyzing some logs.
I am about to write some scripts to automate something in
searching/aggregation. Now I only have 10gb data so the performance don't
vary that much when I do searching or visualization. I spent a lot of time
learning ES's query DSL but seems still not get the key, wondering
query_string will just do the search in Kibana, but I can also use those
verbose query DSL in my script.

My question is, regard to performance or any, is there difference to use
whether query_string, the search box like searching, or use the DSL,
verbose with curry brackets? Or people are encouraged to use DSL because it
performs better than query_string, or something?

For now, I don't see any difference b/w query_string and query DSL. Maybe
some one can give me an example that DSL can do something that query_string
cannot.

Any comments may help me increase my understanding of ES. Thank you!

--
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/d475236c-a5ac-4abf-82e3-5990530ed391%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

query_string is a bit of a trap - if you write an invalid query it just
crashes. So you find yourself working around it with tons of escaping.
Its also really really powerful and shouldn't be exposed directly to end
users unless you want them to be sneaky.

For the most part I'd suggest using the JSON DSL and/or some DSL wrapper
around it.

On Wed, Mar 25, 2015 at 4:28 PM, Lincoln Xiong xiong.huanglin@gmail.com
wrote:

I am new to use Elasticsearch + Logstash + Kibana for analyzing some logs.
I am about to write some scripts to automate something in
searching/aggregation. Now I only have 10gb data so the performance don't
vary that much when I do searching or visualization. I spent a lot of time
learning ES's query DSL but seems still not get the key, wondering
query_string will just do the search in Kibana, but I can also use those
verbose query DSL in my script.

My question is, regard to performance or any, is there difference to use
whether query_string, the search box like searching, or use the DSL,
verbose with curry brackets? Or people are encouraged to use DSL because it
performs better than query_string, or something?

For now, I don't see any difference b/w query_string and query DSL. Maybe
some one can give me an example that DSL can do something that query_string
cannot.

Any comments may help me increase my understanding of ES. Thank you!

--
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/d475236c-a5ac-4abf-82e3-5990530ed391%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d475236c-a5ac-4abf-82e3-5990530ed391%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAPmjWd1L_Wq%3DnLOUD6k-ec-sN9Q8hOxAZw-txp8KQDnBpexS-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Query_string is more straight forward, because most of time I use Kibana to
test my query. But for the DSL, it's kind of hard to fully understand which
query to use. And to test my query is also difficult because too many
brackets...
There is a high level Python API for DSL. I'm learning it.
Thanks for your advice.

On Wednesday, March 25, 2015 at 6:14:26 PM UTC-4, Nikolas Everett wrote:

query_string is a bit of a trap - if you write an invalid query it just
crashes. So you find yourself working around it with tons of escaping.
Its also really really powerful and shouldn't be exposed directly to end
users unless you want them to be sneaky.

For the most part I'd suggest using the JSON DSL and/or some DSL wrapper
around it.

On Wed, Mar 25, 2015 at 4:28 PM, Lincoln Xiong <xiong.h...@gmail.com
<javascript:>> wrote:

I am new to use Elasticsearch + Logstash + Kibana for analyzing some
logs. I am about to write some scripts to automate something in
searching/aggregation. Now I only have 10gb data so the performance don't
vary that much when I do searching or visualization. I spent a lot of time
learning ES's query DSL but seems still not get the key, wondering
query_string will just do the search in Kibana, but I can also use those
verbose query DSL in my script.

My question is, regard to performance or any, is there difference to use
whether query_string, the search box like searching, or use the DSL,
verbose with curry brackets? Or people are encouraged to use DSL because it
performs better than query_string, or something?

For now, I don't see any difference b/w query_string and query DSL. Maybe
some one can give me an example that DSL can do something that query_string
cannot.

Any comments may help me increase my understanding of ES. Thank you!

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/d475236c-a5ac-4abf-82e3-5990530ed391%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/d475236c-a5ac-4abf-82e3-5990530ed391%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/af886b1a-cf9b-4023-bb7a-7816ed4b6979%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.