Skip to content

Commit 92ac05f

Browse files
OAK-12052 | oak-search-elastic: log entire request on query failure (#2680)
1 parent 2c034da commit 92ac05f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,11 @@ private void onFailure(@NotNull Throwable t) {
427427
}
428428

429429
if (t instanceof ElasticsearchException) {
430-
LOG.error("Elastic could not process the request for jcr query [{}] :: Corresponding ES query {} :: ES Response {} : closing scanner, notifying listeners",
431-
indexPlan.getFilter(), query, ((ElasticsearchException) t).error(), t);
430+
LOG.error("Elastic could not process the request for jcr query [{}] :: Corresponding ES request {} :: ES Response {} : closing scanner, notifying listeners",
431+
indexPlan.getFilter(), searchRequest, ((ElasticsearchException) t).error(), t);
432432
} else {
433-
LOG.error("Error retrieving data for jcr query [{}] :: Corresponding ES query {} : closing scanner, notifying listeners",
434-
indexPlan.getFilter(), query, t);
433+
LOG.error("Error retrieving data for jcr query [{}] :: Corresponding ES request {} : closing scanner, notifying listeners",
434+
indexPlan.getFilter(), searchRequest, t);
435435
}
436436
// closing scanner immediately after a failure avoiding them to hang (potentially) forever
437437
close();

0 commit comments

Comments
 (0)