use of org.apache.solr.handler.loader.JavabinLoader in project lucene-solr by apache.
the class UpdateRequestHandler method createDefaultLoaders.
protected Map<String, ContentStreamLoader> createDefaultLoaders(NamedList args) {
SolrParams p = null;
if (args != null) {
p = SolrParams.toSolrParams(args);
}
Map<String, ContentStreamLoader> registry = new HashMap<>();
registry.put("application/xml", new XMLLoader().init(p));
registry.put("application/json", new JsonLoader().init(p));
registry.put("application/csv", new CSVLoader().init(p));
registry.put("application/javabin", new JavabinLoader().init(p));
registry.put("text/csv", registry.get("application/csv"));
registry.put("text/xml", registry.get("application/xml"));
registry.put("text/json", registry.get("application/json"));
pathVsLoaders.put(JSON_PATH, registry.get("application/json"));
pathVsLoaders.put(DOC_PATH, registry.get("application/json"));
pathVsLoaders.put(CSV_PATH, registry.get("application/csv"));
pathVsLoaders.put(BIN_PATH, registry.get("application/javabin"));
return registry;
}
use of org.apache.solr.handler.loader.JavabinLoader in project lucene-solr by apache.
the class MetricsCollectorHandler method init.
@Override
public void init(NamedList initArgs) {
super.init(initArgs);
if (initArgs != null) {
params = SolrParams.toSolrParams(initArgs);
} else {
params = new ModifiableSolrParams();
}
loaders.put("application/xml", new XMLLoader().init(params));
loaders.put("application/json", new JsonLoader().init(params));
loaders.put("application/csv", new CSVLoader().init(params));
loaders.put("application/javabin", new JavabinLoader().init(params));
loaders.put("text/csv", loaders.get("application/csv"));
loaders.put("text/xml", loaders.get("application/xml"));
loaders.put("text/json", loaders.get("application/json"));
}
Aggregations