averma21 commented on a change in pull request #399:
URL: https://github.com/apache/jackrabbit-oak/pull/399#discussion_r736418770



##########
File path: 
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexWriter.java
##########
@@ -102,11 +101,12 @@ public boolean close(long timestamp) throws IOException {
         return bulkProcessorHandler.close();
     }
 
-    protected void provisionIndex(long seed) throws IOException {
+    protected void provisionIndex() throws IOException {
         final IndicesClient indicesClient = 
elasticConnection.getClient().indices();
         // check if index already exists
-        final String indexName = 
ElasticIndexNameHelper.getRemoteIndexName(indexDefinition, seed);
-        boolean exists = indicesClient.exists(new GetIndexRequest(indexName), 
RequestOptions.DEFAULT);
+        boolean exists = elasticConnection.getClient().indices().exists(

Review comment:
       Will we now be creating index using alias? 

##########
File path: 
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexNameHelper.java
##########
@@ -98,8 +75,8 @@ public static String 
getRemoteIndexName(ElasticIndexDefinition indexDefinition)
      * <p>
      * The resulting file name would be truncated to MAX_NAME_LENGTH
      */
-    private static String getElasticSafeIndexName(String indexPath) {
-        String name = StreamSupport
+    public static String getElasticSafeIndexName(String indexPrefix, String 
indexPath) {
+        String name = indexPrefix + "." + StreamSupport

Review comment:
       Since this method is supposed to return a safe name, i think we should 
check indexPrefix for safety here and thrown an exception if it's not safe as 
done in ElasticConnection class.




-- 
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]


Reply via email to