Search in sources :

Example 1 with FieldTypePlugin

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

the class FieldDefCreator method initialize.

/**
 * Initialize singleton instance of {@link FieldDefCreator}. Registers all the standard field
 * types and any additional types provided by {@link FieldTypePlugin}s.
 *
 * @param configuration service configuration
 * @param plugins list of loaded plugins
 */
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
    instance = new FieldDefCreator(configuration);
    for (Plugin plugin : plugins) {
        if (plugin instanceof FieldTypePlugin) {
            FieldTypePlugin fieldTypePlugin = (FieldTypePlugin) plugin;
            instance.register(fieldTypePlugin.getFieldTypes());
        }
    }
}
Also used : FieldTypePlugin(com.yelp.nrtsearch.server.plugins.FieldTypePlugin) Plugin(com.yelp.nrtsearch.server.plugins.Plugin) FieldTypePlugin(com.yelp.nrtsearch.server.plugins.FieldTypePlugin)

Aggregations

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