Skip to content

Commit

Permalink
Merge pull request apache#3 from bloomberg/master-ltr-plugin-develop-…
Browse files Browse the repository at this point in the history
…simplify-inform

simplify LTRComponent.inform's RestManager calls
  • Loading branch information
mnilsson23 committed Jun 1, 2016
2 parents b2bbe8c + 550d7ca commit 96f9d4f
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 96f9d4f

Please # to comment.