mirror of
https://github.com/apache/lucene.git
synced 2025-02-22 10:15:27 +00:00
remove the hack to get the DIH handler name
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1662663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62130ae70c
commit
6c84653e08
@ -95,19 +95,12 @@ public class DataImportHandler extends RequestHandlerBase implements
|
||||
@SuppressWarnings("unchecked")
|
||||
public void inform(SolrCore core) {
|
||||
try {
|
||||
//hack to get the name of this handler
|
||||
for (Map.Entry<String, SolrRequestHandler> e : core.getRequestHandlers().entrySet()) {
|
||||
SolrRequestHandler handler = e.getValue();
|
||||
//this will not work if startup=lazy is set
|
||||
if( this == handler) {
|
||||
String name= e.getKey();
|
||||
if(name.startsWith("/")){
|
||||
myName = name.substring(1);
|
||||
}
|
||||
// some users may have '/' in the handler name. replace with '_'
|
||||
myName = myName.replaceAll("/","_") ;
|
||||
}
|
||||
String name = getPluginInfo().name;
|
||||
if (name.startsWith("/")) {
|
||||
myName = name.substring(1);
|
||||
}
|
||||
// some users may have '/' in the handler name. replace with '_'
|
||||
myName = myName.replaceAll("/", "_");
|
||||
debugEnabled = StrUtils.parseBool((String)initArgs.get(ENABLE_DEBUG), true);
|
||||
importer = new DataImporter(core, myName);
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user