How to get query time?


(maho) #1

Hi,

is it possible to get the query time for searching and indexing?

One year ago it was discussed: In
http://elasticsearch-users.115913.n3.nabble.com/Elapsed-query-time-td428663.html


(maho) #2

I have just seen that BulkResponse has a getTookInMillis-Method.
So I'll use BulkResponse instead of IndexResponse.

Maybe it will be better to provide the getTookInMillis-Method in every
Response-Class.

On 25 Mai, 11:02, maho mathias.hod...@gmail.com wrote:

Hi,

is it possible to get the query time for searching and indexing?

One year ago it was discussed: Inhttp://elasticsearch-users.115913.n3.nabble.com/Elapsed-query-time-td...


(Lukáš Vlček) #3

Hi,

you get millis in search response. As for the indexing operations I can not
speak for Shay but I think you have to keep in mind that when you get the
response back it does not have to mean that the operation itself has been
propagated to all shard replicas in the cluster (you can opt between sync
and async operations per request). So it depends what specifically you are
after.

just my 2cents
Lukas

On Wed, May 25, 2011 at 11:24 AM, maho mathias.hodler@gmail.com wrote:

I have just seen that BulkResponse has a getTookInMillis-Method.
So I'll use BulkResponse instead of IndexResponse.

Maybe it will be better to provide the getTookInMillis-Method in every
Response-Class.

On 25 Mai, 11:02, maho mathias.hod...@gmail.com wrote:

Hi,

is it possible to get the query time for searching and indexing?

One year ago it was discussed: Inhttp://
elasticsearch-users.115913.n3.nabble.com/Elapsed-query-time-td...


(Shay Banon) #4

Search already has it. Index operation is something that you need to track, I don't see a reason why you would really need in typical operations, and adding the overhead does not seem reasonable (to me :), open to other people opinions).

Replication is, by default, sync.
On Wednesday, May 25, 2011 at 1:04 PM, Lukáš Vlček wrote:
Hi,

you get millis in search response. As for the indexing operations I can not speak for Shay but I think you have to keep in mind that when you get the response back it does not have to mean that the operation itself has been propagated to all shard replicas in the cluster (you can opt between sync and async operations per request). So it depends what specifically you are after.

just my 2cents
Lukas

On Wed, May 25, 2011 at 11:24 AM, maho mathias.hodler@gmail.com wrote:

I have just seen that BulkResponse has a getTookInMillis-Method.
So I'll use BulkResponse instead of IndexResponse.

Maybe it will be better to provide the getTookInMillis-Method in every
Response-Class.

On 25 Mai, 11:02, maho mathias.hod...@gmail.com wrote:

Hi,

is it possible to get the query time for searching and indexing?

One year ago it was discussed: Inhttp://elasticsearch-users.115913.n3.nabble.com/Elapsed-query-time-td...


(system) #5