tihom88 commented on code in PR #2270:
URL: https://github.com/apache/jackrabbit-oak/pull/2270#discussion_r2079466597


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java:
##########
@@ -97,9 +107,48 @@ private static ObjectBuilder<TypeMapping> 
loadMappings(@NotNull TypeMapping.Buil
         if (indexDefinition.inferenceDefinition != null) {
             mapInferenceDefinition(builder, 
indexDefinition.inferenceDefinition);
         }
+        // We only add mappings if both the inference config (in 
queryEngineSettings config) and the inference index config are enabled.
+        if (InferenceConfig.getInstance().isInferenceEnabled() && 
InferenceConfig.getInstance().isEnabled()) {
+            mapInferenceConfig(builder, indexDefinition, 
InferenceConfig.getInstance());
+        }
         return builder;
     }
 
+    private static void mapInferenceConfig(TypeMapping.Builder builder, 
@NotNull ElasticIndexDefinition indexDefinition, @NotNull InferenceConfig 
inferenceConfig) {

Review Comment:
   Can you elaborate a bit on these flags and how these should be used.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to