Search in sources :

Example 1 with RescorerPlugin

use of com.yelp.nrtsearch.server.plugins.RescorerPlugin in project nrtsearch by Yelp.

the class RescorerCreator method initialize.

/**
 * Initialize singleton instance of {@link RescorerCreator}. Registers any additional {@link
 * RescoreOperation} implementations provided by {@link RescorerPlugin}s.
 *
 * @param configuration service configuration
 * @param plugins list of loaded plugins
 */
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
    instance = new RescorerCreator(configuration);
    for (Plugin plugin : plugins) {
        if (plugin instanceof RescorerPlugin) {
            RescorerPlugin rescorePlugin = (RescorerPlugin) plugin;
            instance.register(rescorePlugin.getRescorers());
        }
    }
}
Also used : RescorerPlugin(com.yelp.nrtsearch.server.plugins.RescorerPlugin) Plugin(com.yelp.nrtsearch.server.plugins.Plugin) RescorerPlugin(com.yelp.nrtsearch.server.plugins.RescorerPlugin)

Aggregations

Plugin (com.yelp.nrtsearch.server.plugins.Plugin)1 RescorerPlugin (com.yelp.nrtsearch.server.plugins.RescorerPlugin)1