fabriziofortino commented on code in PR #709:
URL: https://github.com/apache/jackrabbit-oak/pull/709#discussion_r976628273
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java:
##########
@@ -158,24 +159,23 @@ private void saveMetrics() {
}
private void provisionIndex() throws IOException {
- ElasticsearchIndicesClient client =
elasticConnection.getClient().indices();
+ final ElasticsearchIndicesClient esClient =
elasticConnection.getClient().indices();
// check if index already exists
- if(client.exists(i -> i.index(indexName)).value()) {
+ if (esClient.exists(i -> i.index(indexName)).value()) {
LOG.info("Index {} already exists. Skip index provision",
indexName);
return;
}
- // create the new index
final CreateIndexRequest request =
ElasticIndexHelper.createIndexRequest(indexName, indexDefinition);
+ if (LOG.isDebugEnabled()) {
+ StringBuilder sb = new StringBuilder();
+ JsonpUtils.toString(request,sb);
Review Comment:
minor, missing space
```suggestion
JsonpUtils.toString(request, sb);
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]