Browse Source

Merge pull request #138 from pelias/benchmarking

add logging for elasticsearch query execution time
pull/144/head
Peter Johnson a.k.a. insertcoffee 10 years ago
parent
commit
c702614913
  1. 3
      service/search.js

3
service/search.js

@ -18,6 +18,9 @@ function service( backend, cmd, cb ){
// handle backend errors
if( err ){ return cb( err ); }
// log total ms elasticsearch reported the query took to execute
peliasLogger.verbose( 'time elasticsearch reported:', data.took / 1000 );
// map returned documents
var docs = [];
if( data && data.hits && data.hits.total && Array.isArray(data.hits.hits)){

Loading…
Cancel
Save