use of com.yelp.nrtsearch.server.plugins.Plugin 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());
}
}
}
use of com.yelp.nrtsearch.server.plugins.Plugin in project nrtsearch by Yelp.
the class CollectorCreator method initialize.
/**
* Initialize singleton instance of {@link CollectorCreator}. Registers any standard tasks and any
* additional tasks provided by {@link com.yelp.nrtsearch.server.grpc.PluginCollector}s.
*
* @param configuration service configuration
* @param plugins list of loaded plugins
*/
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
instance = new CollectorCreator(configuration);
for (Plugin plugin : plugins) {
if (plugin instanceof CollectorPlugin) {
CollectorPlugin collectorPlugin = (CollectorPlugin) plugin;
instance.register(collectorPlugin.getCollectors());
}
}
}
use of com.yelp.nrtsearch.server.plugins.Plugin in project nrtsearch by Yelp.
the class FetchTaskCreator method initialize.
/**
* Initialize singleton instance of {@link FetchTaskCreator}. Registers any standard tasks and any
* additional tasks provided by {@link FetchTaskPlugin}s.
*
* @param configuration service configuration
* @param plugins list of loaded plugins
*/
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
instance = new FetchTaskCreator(configuration);
for (Plugin plugin : plugins) {
if (plugin instanceof FetchTaskPlugin) {
FetchTaskPlugin fetchTaskPlugin = (FetchTaskPlugin) plugin;
instance.register(fetchTaskPlugin.getFetchTasks());
}
}
}
use of com.yelp.nrtsearch.server.plugins.Plugin 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());
}
}
}
use of com.yelp.nrtsearch.server.plugins.Plugin in project nrtsearch by Yelp.
the class BackendGlobalStateTest method setup.
@BeforeClass
public static void setup() {
String configFile = "nodeName: \"lucene_server_foo\"";
LuceneServerConfiguration dummyConfig = new LuceneServerConfiguration(new ByteArrayInputStream(configFile.getBytes()));
List<Plugin> dummyPlugins = Collections.emptyList();
// these must be initialized to create an IndexState
FieldDefCreator.initialize(dummyConfig, dummyPlugins);
SimilarityCreator.initialize(dummyConfig, dummyPlugins);
}
Aggregations