That is expected behavior.
The Search phase has to A) traverse all the shards, B) traverse all
documents which match your (potentially complex) query and C) calculate a
score for each matching document. Depending on your query, that is
potentially a lot of documents to evaluate.
In contrast, the Fetch phase is given a list of document addresses (shard
and docID). The list is usually small, say ten results. It then goes
straight to the appropriate shard, loads the document and serializes the
source back to the coordinating node. This is much faster than the Search
As an aside, by default elasticsearch will search all shards of an index.
You can use custom routing to direct the search to a particular shard, but
this is generally more advanced behavior and may not be needed.
On Friday, September 20, 2013 4:22:52 PM UTC-4, Pierce Wetter wrote:
So my query times in Elastic HQ are about 7x the fetch times.
Is that expected or is it possible we're not giving the shard hint
correctly so it has to ask all the shards?
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 firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.