Elasticsearch unknown perfomance issue

Hello,

I am running a pretty simply filter query in elasticsearch; the took field
in elasticsearch's response indicates that the query is quite fast, and
takes only a couple miliseconds. If I run the request via a CURL call from
the command line and time that, it takes slightly longer around 20-40
milliseconds, which I assume is due to network issues and serialization in
ES.

However, I have a script which uses the elasticsearch ruby client that
runs this same request and when I time it, it takes roughly 450
milliseconds, which seems way too long. I am wondering if anyone has seen a
similar issue, either with the ruby client or another client? I have copied
the code for the request below, omitting the exact filters and sort
clauses.

Thanks a lot for the help and any insight or places to look would be really
appreciated!

query = Jbuilder.encode do |json|
json.sort sort_clause
json.from 0
json.size 100
json.query do
json.constant_score do
json.filter do
json.bool do
json.must must_queries
end
end
end
end
end

raw_response = self.client.search(:index => my_index, :type => my_type,
:body => query)

--
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/db719985-4977-49d8-be5d-d9a6caa0dffe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sorry, one more quick note: the time goes down several hundred milliseconds
if I only fetch the first 3 results, instead of 100, which leads me to
believe the issue has something to do with serializing or the client's
handling of the ES response; however, I am not sure what could be the
bottleneck. Thanks again!

On Thursday, July 24, 2014 2:32:20 PM UTC-7, nathani...@healthtap.com wrote:

Hello,

I am running a pretty simply filter query in elasticsearch; the took field
in elasticsearch's response indicates that the query is quite fast, and
takes only a couple miliseconds. If I run the request via a CURL call from
the command line and time that, it takes slightly longer around 20-40
milliseconds, which I assume is due to network issues and serialization in
ES.

However, I have a script which uses the elasticsearch ruby client that
runs this same request and when I time it, it takes roughly 450
milliseconds, which seems way too long. I am wondering if anyone has seen a
similar issue, either with the ruby client or another client? I have copied
the code for the request below, omitting the exact filters and sort
clauses.

Thanks a lot for the help and any insight or places to look would be
really appreciated!

query = Jbuilder.encode do |json|
json.sort sort_clause
json.from 0
json.size 100
json.query do
json.constant_score do
json.filter do
json.bool do
json.must must_queries
end
end
end
end
end

raw_response = self.client.search(:index => my_index, :type => my_type,
:body => query)

--
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/bc21edf7-3b5b-41e8-967b-51c2ba22cc58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.