diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/ranking/LTRComponent.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/ranking/LTRComponent.java index 46a3d09dceaa..7cccdfa6138e 100644 --- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/ranking/LTRComponent.java +++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/ranking/LTRComponent.java @@ -62,17 +62,11 @@ public void onManagedResourceInitialized(NamedList args, @Override public void inform(SolrCore core) { - core.getRestManager().addManagedResource( + final ManagedFeatureStore fr = (ManagedFeatureStore) core.getRestManager().addManagedResource( CommonLTRParams.FEATURE_STORE_END_POINT, ManagedFeatureStore.class); - final ManagedFeatureStore fr = (ManagedFeatureStore) core.getRestManager() - .getManagedResource(CommonLTRParams.FEATURE_STORE_END_POINT); - core.getRestManager().addManagedResource( + final ManagedModelStore mr = (ManagedModelStore) core.getRestManager().addManagedResource( CommonLTRParams.MODEL_STORE_END_POINT, ManagedModelStore.class); - final ManagedModelStore mr = (ManagedModelStore) core.getRestManager() - .getManagedResource(CommonLTRParams.MODEL_STORE_END_POINT); - // core.getResourceLoader().getManagedResourceRegistry().registerManagedResource(LTRParams.FSTORE_END_POINT, - // , observer); mr.init(fr); // now we can safely load the models mr.loadStoredModels();