mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 02:35:02 +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")
|
@SuppressWarnings("unchecked")
|
||||||
public void inform(SolrCore core) {
|
public void inform(SolrCore core) {
|
||||||
try {
|
try {
|
||||||
//hack to get the name of this handler
|
String name = getPluginInfo().name;
|
||||||
for (Map.Entry<String, SolrRequestHandler> e : core.getRequestHandlers().entrySet()) {
|
if (name.startsWith("/")) {
|
||||||
SolrRequestHandler handler = e.getValue();
|
myName = name.substring(1);
|
||||||
//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("/","_") ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// some users may have '/' in the handler name. replace with '_'
|
||||||
|
myName = myName.replaceAll("/", "_");
|
||||||
debugEnabled = StrUtils.parseBool((String)initArgs.get(ENABLE_DEBUG), true);
|
debugEnabled = StrUtils.parseBool((String)initArgs.get(ENABLE_DEBUG), true);
|
||||||
importer = new DataImporter(core, myName);
|
importer = new DataImporter(core, myName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user