From 97d3f84f836b60c8f89fb596497289bcf9464eeb Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Thu, 9 Nov 2023 03:39:49 +0000 Subject: [PATCH] Fix `limit` doesn't work for `findEndpoint` API in ES storage --- .../storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java index 9a103b536c916..5bae5a6431231 100644 --- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java +++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/MetadataQueryEsDAO.java @@ -238,7 +238,7 @@ public List findEndpoint(String keyword, String serviceId, int limit) .client(getClient()) .search(search.build()) .index(index) - .queryMaxSize(queryMaxSize) + .queryMaxSize(limit) .resultConverter(searchHit -> { final var sourceAsMap = searchHit.getSource();