use of com.yelp.nrtsearch.server.plugins.SimilarityPlugin in project nrtsearch by Yelp.
the class SimilarityCreator method initialize.
/**
* Initialize singleton instance of {@link SimilarityCreator}. Registers all the standard
* similarity implementations and any additional provided by {@link SimilarityPlugin}s.
*
* @param configuration service configuration
* @param plugins list of loaded plugins
*/
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
instance = new SimilarityCreator(configuration);
for (Plugin plugin : plugins) {
if (plugin instanceof SimilarityPlugin) {
SimilarityPlugin similarityPlugin = (SimilarityPlugin) plugin;
instance.register(similarityPlugin.getSimilarities());
}
}
}
Aggregations