wu-sheng commented on a change in pull request #5132:
URL: https://github.com/apache/skywalking/pull/5132#discussion_r469084841



##########
File path: 
oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java
##########
@@ -331,9 +333,25 @@ public boolean deleteTemplate(String indexName) throws 
IOException {
         return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
     }
 
+    public SearchResponse search(IndexNameMaker indexNameMaker, 
SearchSourceBuilder searchSourceBuilder) throws IOException {
+        String[] indexNames = 
Arrays.stream(indexNameMaker.make()).map(this::formatIndexName).toArray(String[]::new);
+        return search(indexNames, searchSourceBuilder);

Review comment:
       Why need and call `search` again? And in both methods, you are only 
doing the `formatIndexName`. I think the namespace would be added twice.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to