Add total hits to the search slow log (#29034)
This commit adds the total hits to the search slow log.
This commit is contained in:
parent
8f0da37c5e
commit
46fcd07153
|
@ -149,8 +149,11 @@ public final class SearchSlowLog implements SearchOperationListener {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(context.indexShard().shardId()).append(" ");
|
||||
sb.append("took[").append(TimeValue.timeValueNanos(tookInNanos)).append("], took_millis[").append(TimeUnit.NANOSECONDS.toMillis(tookInNanos)).append("], ");
|
||||
sb.append(context.indexShard().shardId())
|
||||
.append(" ")
|
||||
.append("took[").append(TimeValue.timeValueNanos(tookInNanos)).append("], ")
|
||||
.append("took_millis[").append(TimeUnit.NANOSECONDS.toMillis(tookInNanos)).append("], ")
|
||||
.append("total_hits[").append(context.queryResult().getTotalHits()).append("], ");
|
||||
if (context.getQueryShardContext().getTypes() == null) {
|
||||
sb.append("types[], ");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue