mirror of https://github.com/apache/lucene.git
SOLR-6792 deprecate AdminHandlers, Clean up solrconfig.xml of unnecessary plugin definitions, implicit registration of /replication, /get and /admin/* handlers
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1641790 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f39a0e5786
commit
9184a44687
|
@ -423,6 +423,10 @@ Other Changes
|
|||
* SOLR-6751: Exceptions thrown in the analysis chain in DirectUpdateHandler2
|
||||
should return a BAD_REQUEST status (Alan Woodward)
|
||||
|
||||
* SOLR-SOLR-6792 : deprecate AdminHandlers, Clean up solrconfig.xml of
|
||||
unnecessary plugin definitions, implicit registration of /replication,
|
||||
/get and /admin/* handlers (Noble Paul)
|
||||
|
||||
================== 4.10.3 ==================
|
||||
|
||||
Bug Fixes
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
package org.apache.solr.core;
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.handler.PingRequestHandler;
|
||||
import org.apache.solr.handler.RealTimeGetHandler;
|
||||
import org.apache.solr.handler.ReplicationHandler;
|
||||
import org.apache.solr.handler.SolrConfigHandler;
|
||||
import org.apache.solr.handler.UpdateRequestHandler;
|
||||
import org.apache.solr.handler.admin.LoggingHandler;
|
||||
import org.apache.solr.handler.admin.LukeRequestHandler;
|
||||
import org.apache.solr.handler.admin.PluginInfoHandler;
|
||||
import org.apache.solr.handler.admin.PropertiesRequestHandler;
|
||||
import org.apache.solr.handler.admin.ShowFileRequestHandler;
|
||||
import org.apache.solr.handler.admin.SolrInfoMBeanHandler;
|
||||
import org.apache.solr.handler.admin.SystemInfoHandler;
|
||||
import org.apache.solr.handler.admin.ThreadDumpHandler;
|
||||
import org.apache.solr.request.SolrRequestHandler;
|
||||
|
||||
import static java.util.Collections.singletonMap;
|
||||
import static org.apache.solr.common.cloud.ZkNodeProps.makeMap;
|
||||
import static org.apache.solr.core.PluginInfo.DEFAULTS;
|
||||
import static org.apache.solr.core.PluginInfo.INVARIANTS;
|
||||
|
||||
public class PluginsRegistry {
|
||||
|
||||
public static List<PluginInfo> getHandlers(SolrCore solrCore){
|
||||
List<PluginInfo> implicits = new ArrayList<>();
|
||||
|
||||
//update handle implicits
|
||||
implicits.add(getReqHandlerInfo("/update", UpdateRequestHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo(UpdateRequestHandler.JSON_PATH, UpdateRequestHandler.class, singletonMap("update.contentType", "application/json")));
|
||||
implicits.add(getReqHandlerInfo(UpdateRequestHandler.CSV_PATH, UpdateRequestHandler.class, singletonMap("update.contentType", "application/csv")));
|
||||
implicits.add(getReqHandlerInfo(UpdateRequestHandler.DOC_PATH, UpdateRequestHandler.class, makeMap("update.contentType", "application/json", "json.command", "false")));
|
||||
|
||||
//solrconfighandler
|
||||
implicits.add(getReqHandlerInfo("/config", SolrConfigHandler.class, null));
|
||||
|
||||
//register replicationhandler always for SolrCloud
|
||||
implicits.add(getReqHandlerInfo("/replication", ReplicationHandler.class,null));
|
||||
|
||||
implicits.add(getReqHandlerInfo("/get", RealTimeGetHandler.class,
|
||||
makeMap(
|
||||
"omitHeader", "true",
|
||||
"wt", "json",
|
||||
"indent", "true")));
|
||||
//register adminHandlers
|
||||
implicits.add(getReqHandlerInfo("/admin/luke", LukeRequestHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/system", SystemInfoHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/mbeans", SolrInfoMBeanHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/plugins", PluginInfoHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/threads", ThreadDumpHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/properties", PropertiesRequestHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/logging", LoggingHandler.class, null));
|
||||
implicits.add(getReqHandlerInfo("/admin/file", ShowFileRequestHandler.class, null));
|
||||
PluginInfo ping = getReqHandlerInfo("/admin/ping", PingRequestHandler.class, null);
|
||||
ping.initArgs.add(INVARIANTS, new NamedList<>(makeMap("echoParams", "all", "q", "solrpingquery")));
|
||||
implicits.add(ping);
|
||||
return implicits;
|
||||
}
|
||||
|
||||
public static PluginInfo getReqHandlerInfo(String name, Class clz, Map defaults){
|
||||
if(defaults == null) defaults= Collections.emptyMap();
|
||||
Map m = makeMap("name", name, "class", clz.getName());
|
||||
return new PluginInfo(SolrRequestHandler.TYPE, m, new NamedList<>(singletonMap(DEFAULTS, new NamedList(defaults))),null);
|
||||
}
|
||||
}
|
|
@ -139,7 +139,8 @@ public final class RequestHandlers {
|
|||
* Handlers will be registered and initialized in the order they appear in solrconfig.xml
|
||||
*/
|
||||
|
||||
void initHandlersFromConfig(SolrConfig config, List<PluginInfo> implicits){
|
||||
void initHandlersFromConfig(SolrConfig config){
|
||||
List<PluginInfo> implicits = PluginsRegistry.getHandlers(core);
|
||||
// use link map so we iterate in the same order
|
||||
Map<PluginInfo,SolrRequestHandler> handlers = new LinkedHashMap<>();
|
||||
Map<String, PluginInfo> implicitInfoMap= new HashMap<>();
|
||||
|
|
|
@ -807,11 +807,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
|
|||
// Processors initialized before the handlers
|
||||
updateProcessorChains = loadUpdateProcessorChains();
|
||||
reqHandlers = new RequestHandlers(this);
|
||||
List<PluginInfo> implicitReqHandlerInfo = new ArrayList<>();
|
||||
UpdateRequestHandler.addImplicits(implicitReqHandlerInfo);
|
||||
SolrConfigHandler.addImplicits(implicitReqHandlerInfo);
|
||||
|
||||
reqHandlers.initHandlersFromConfig(solrConfig, implicitReqHandlerInfo);
|
||||
reqHandlers.initHandlersFromConfig(solrConfig);
|
||||
|
||||
// Handle things that should eventually go away
|
||||
initDeprecatedSupport();
|
||||
|
|
|
@ -312,14 +312,6 @@ public class SolrConfigHandler extends RequestHandlerBase implements SolrCoreAwa
|
|||
req.setParams(SolrParams.wrapDefaults(params, new MapSolrParams(map)));
|
||||
}
|
||||
|
||||
|
||||
public static void addImplicits(List<PluginInfo> infoList){
|
||||
Map m = makeMap("name", "/config", "class", SolrConfigHandler.class.getName());
|
||||
infoList.add(new PluginInfo(SolrRequestHandler.TYPE, m, new NamedList<>(singletonMap(DEFAULTS, new NamedList())), null));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public SolrRequestHandler getSubHandler(String path) {
|
||||
if(subPaths.contains(path)) return this;
|
||||
|
|
|
@ -172,17 +172,6 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {
|
|||
return "Add documents using XML (with XSLT), CSV, JSON, or javabin";
|
||||
}
|
||||
|
||||
public static void addImplicits(List<PluginInfo> implicits) {
|
||||
implicits.add(getPluginInfo("/update",Collections.emptyMap()));
|
||||
implicits.add(getPluginInfo(JSON_PATH, singletonMap("update.contentType", "application/json")));
|
||||
implicits.add(getPluginInfo(CSV_PATH, singletonMap("update.contentType", "application/csv")));
|
||||
implicits.add(getPluginInfo(DOC_PATH, makeMap("update.contentType", "application/json", "json.command","false")));
|
||||
}
|
||||
|
||||
static PluginInfo getPluginInfo(String name, Map defaults){
|
||||
Map m = makeMap("name", name, "class", UpdateRequestHandler.class.getName());
|
||||
return new PluginInfo("requestHandler", m, new NamedList<>( singletonMap("defaults", new NamedList(defaults))) ,null);
|
||||
}
|
||||
public static final String DOC_PATH = "/update/json/docs";
|
||||
public static final String JSON_PATH = "/update/json";
|
||||
public static final String CSV_PATH = "/update/csv";
|
||||
|
|
|
@ -27,14 +27,18 @@ import org.apache.solr.request.SolrQueryRequest;
|
|||
import org.apache.solr.request.SolrRequestHandler;
|
||||
import org.apache.solr.response.SolrQueryResponse;
|
||||
import org.apache.solr.util.plugin.SolrCoreAware;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A special Handler that registers all standard admin handlers
|
||||
*
|
||||
* @since solr 1.3
|
||||
*/
|
||||
@Deprecated
|
||||
public class AdminHandlers implements SolrCoreAware, SolrRequestHandler
|
||||
{
|
||||
public static Logger log = LoggerFactory.getLogger(AdminHandlers.class);
|
||||
NamedList initArgs = null;
|
||||
|
||||
private static class StandardHandler {
|
||||
|
@ -100,6 +104,7 @@ public class AdminHandlers implements SolrCoreAware, SolrRequestHandler
|
|||
}
|
||||
}
|
||||
}
|
||||
log.warn("<requestHandler name=\"/admin/\" \n class=\"solr.admin.AdminHandlers\" /> is deprecated . It is not required anymore");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -185,7 +185,6 @@
|
|||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
|
||||
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
|
||||
|
@ -201,11 +200,6 @@ based HashBitset. -->
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="dismax" class="solr.SearchHandler" >
|
||||
<lst name="defaults">
|
||||
|
@ -230,8 +224,6 @@ based HashBitset. -->
|
|||
|
||||
<requestHandler name="mock" class="org.apache.solr.core.MockQuerySenderListenerReqHandler"/>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<!-- test query parameter defaults -->
|
||||
<requestHandler name="defaults" class="solr.StandardRequestHandler">
|
||||
<lst name="defaults">
|
||||
|
|
|
@ -185,8 +185,6 @@
|
|||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
|
||||
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
|
||||
based HashBitset. -->
|
||||
|
@ -201,12 +199,6 @@ based HashBitset. -->
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="dismax" class="solr.SearchHandler" >
|
||||
<lst name="defaults">
|
||||
<str name="defType">dismax</str>
|
||||
|
@ -230,8 +222,6 @@ based HashBitset. -->
|
|||
|
||||
<requestHandler name="mock" class="org.apache.solr.core.MockQuerySenderListenerReqHandler"/>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<!-- test query parameter defaults -->
|
||||
<requestHandler name="defaults" class="solr.StandardRequestHandler">
|
||||
<lst name="defaults">
|
||||
|
|
|
@ -50,8 +50,6 @@
|
|||
</arr>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true" >
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
||||
|
|
|
@ -45,15 +45,6 @@
|
|||
<useFilterForSortedQuery>${solr.test.useFilterForSortedQuery}</useFilterForSortedQuery>
|
||||
</query>
|
||||
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
<requestHandler name="/select" class="solr.SearchHandler" default="true" />
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
|
||||
</config>
|
||||
|
||||
|
|
|
@ -38,15 +38,7 @@
|
|||
</updateLog>
|
||||
</updateHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
<requestHandler name="/select" class="solr.SearchHandler" default="true" />
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
|
||||
|
||||
<updateRequestProcessorChain name="convert-ttl-defaults">
|
||||
<processor class="solr.processor.DocExpirationUpdateProcessorFactory">
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
|
||||
<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
<updateLog>
|
||||
<str name="dir">${solr.ulog.dir:}</str>
|
||||
|
@ -115,11 +111,5 @@
|
|||
<requestHandler name="standard" class="solr.StandardRequestHandler">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
</config>
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
|
||||
</query>
|
||||
|
||||
<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
|
||||
|
||||
<requestDispatcher handleSelect="false">
|
||||
<httpCaching never304="true"/>
|
||||
</requestDispatcher>
|
||||
|
@ -66,8 +64,6 @@
|
|||
</lst>
|
||||
|
||||
</requestHandler>
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler">
|
||||
</requestHandler>
|
||||
|
||||
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
|
||||
<!-- For the purposes of the tutorial, JSON responses are written as
|
||||
|
|
|
@ -39,14 +39,6 @@
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler"/>
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestHandler name="/dump" class="DumpRequestHandler" initParams="a">
|
||||
<lst name="defaults">
|
||||
|
|
|
@ -55,8 +55,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048"/>
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<str name="maxNumberOfBackups">1</str>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
|
|
|
@ -56,8 +56,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048"/>
|
||||
|
|
|
@ -54,8 +54,5 @@
|
|||
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
</config>
|
||||
|
||||
|
|
|
@ -185,8 +185,6 @@
|
|||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
|
||||
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
|
||||
based HashBitset. -->
|
||||
|
@ -201,11 +199,6 @@ based HashBitset. -->
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="dismax" class="solr.SearchHandler" >
|
||||
<lst name="defaults">
|
||||
|
@ -230,8 +223,6 @@ based HashBitset. -->
|
|||
|
||||
<requestHandler name="mock" class="org.apache.solr.core.MockQuerySenderListenerReqHandler"/>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<!-- test query parameter defaults -->
|
||||
<requestHandler name="defaults" class="solr.StandardRequestHandler">
|
||||
<lst name="defaults">
|
||||
|
@ -250,8 +241,6 @@ based HashBitset. -->
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
|
||||
<!-- This is slightly different from the field value so we can test dealing with token offset changes -->
|
||||
<str name="queryAnalyzerFieldType">lowerpunctfilt</str>
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
||||
<lst name="master">
|
||||
<str name="replicateAfter">commit</str>
|
||||
|
|
|
@ -39,21 +39,14 @@
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler">
|
||||
<lst name="defaults">
|
||||
<str name="update.chain">add-unknown-fields-to-the-schema</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<!-- Add unknown fields to the schema
|
||||
<!-- Add unknown fields to the schema
|
||||
|
||||
An example field type guessing update processor that will
|
||||
attempt to parse string-typed field values as Booleans, Longs,
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
||||
<lst name="slave">
|
||||
<str name="masterUrl">http://127.0.0.1:TEST_PORT/solr</str>
|
||||
|
|
|
@ -40,11 +40,6 @@
|
|||
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
||||
|
||||
</requestHandler>
|
||||
|
||||
<!-- enable streaming for testing... -->
|
||||
<requestDispatcher handleSelect="true">
|
||||
|
|
|
@ -46,16 +46,6 @@
|
|||
<requestHandler name="standard" class="solr.StandardRequestHandler">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
<updateLog>
|
||||
<str name="dir">${solr.ulog.dir:}</str>
|
||||
|
@ -85,8 +75,6 @@
|
|||
<processor class="solr.RunUpdateProcessorFactory" />
|
||||
</updateRequestProcessorChain>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
||||
<lst name="invariants">
|
||||
<str name="hidden">bogus.txt</str>
|
||||
|
|
|
@ -46,16 +46,6 @@
|
|||
<requestHandler name="standard" class="solr.StandardRequestHandler">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<updateHandler class="solr.DirectUpdateHandler2">
|
||||
<updateLog>
|
||||
<str name="dir">${solr.ulog.dir:}</str>
|
||||
|
@ -85,7 +75,6 @@
|
|||
<processor class="solr.RunUpdateProcessorFactory" />
|
||||
</updateRequestProcessorChain>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
||||
<lst name="invariants">
|
||||
|
|
|
@ -48,10 +48,5 @@
|
|||
|
||||
<queryResponseWriter name="javabin"
|
||||
class="solr.TestTolerantSearch$BadResponseWriter" />
|
||||
|
||||
<requestHandler name="/admin/"
|
||||
class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
</config>
|
||||
|
||||
|
|
|
@ -45,14 +45,7 @@
|
|||
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
<requestHandler name="/dump" class="solr.DumpRequestHandler">
|
||||
</requestHandler>
|
||||
</config>
|
||||
|
||||
|
|
|
@ -190,8 +190,6 @@
|
|||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
|
||||
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
|
||||
based HashBitset. -->
|
||||
|
@ -206,12 +204,6 @@
|
|||
<bool name="httpCaching">true</bool>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="dismax" class="solr.SearchHandler" >
|
||||
<lst name="defaults">
|
||||
<str name="defType">dismax</str>
|
||||
|
@ -235,8 +227,6 @@
|
|||
|
||||
<requestHandler name="mock" class="org.apache.solr.core.MockQuerySenderListenerReqHandler"/>
|
||||
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
||||
<lst name="invariants">
|
||||
<str name="hidden">bogus.txt</str>
|
||||
|
@ -267,7 +257,7 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
|
||||
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
|
||||
<!-- This is slightly different from the field value so we can test dealing with token offset changes -->
|
||||
|
|
|
@ -71,6 +71,4 @@
|
|||
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
|
||||
</config>
|
||||
|
|
|
@ -105,12 +105,14 @@ public class MinimalSchemaTest extends SolrTestCaseJ4 {
|
|||
Set<String> handlerNames = h.getCore().getRequestHandlers().keySet();
|
||||
for (String handler : handlerNames) {
|
||||
try {
|
||||
|
||||
if (handler.startsWith("/update")) {
|
||||
continue;
|
||||
}
|
||||
if (handler.startsWith("/mlt")) {
|
||||
continue;
|
||||
}
|
||||
if(handler.equals("/admin/ping")) continue;
|
||||
|
||||
assertQ("failure w/handler: '" + handler + "'",
|
||||
req("qt", handler,
|
||||
|
|
|
@ -107,10 +107,6 @@ public class TestConfig extends SolrTestCaseJ4 {
|
|||
ShowFileRequestHandler handler = (ShowFileRequestHandler) h.getCore().getRequestHandler("/admin/file");
|
||||
assertTrue("file handler should have been automatically registered", handler != null);
|
||||
|
||||
//System.out.println( handler.getHiddenFiles() );
|
||||
// should not contain: <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
|
||||
assertFalse(handler.getHiddenFiles().contains("schema.xml".toUpperCase(Locale.ROOT)));
|
||||
assertTrue(handler.getHiddenFiles().contains("PROTWORDS.TXT"));
|
||||
}
|
||||
|
||||
// If defaults change, add test methods to cover each version
|
||||
|
|
|
@ -121,7 +121,7 @@ public class TestConfigSets extends SolrTestCaseJ4 {
|
|||
// We initially don't have a /get handler defined
|
||||
SolrCore core = container.create(new CoreDescriptor(container, "core1", testDirectory + "/core", "configSet", "configset-2"));
|
||||
assertThat("No /get handler should be defined in the initial configuration",
|
||||
core.getRequestHandler("/get"), is(nullValue()));
|
||||
core.getRequestHandler("/dump"), is(nullValue()));
|
||||
|
||||
// Now copy in a config with a /get handler and reload
|
||||
FileUtils.copyFile(getFile("solr/collection1/conf/solrconfig-withgethandler.xml"),
|
||||
|
@ -130,7 +130,7 @@ public class TestConfigSets extends SolrTestCaseJ4 {
|
|||
|
||||
core = container.getCore("core1");
|
||||
assertThat("A /get handler should be defined in the reloaded configuration",
|
||||
core.getRequestHandler("/get"), is(notNullValue()));
|
||||
core.getRequestHandler("/dump"), is(notNullValue()));
|
||||
core.close();
|
||||
|
||||
container.shutdown();
|
||||
|
|
|
@ -57,35 +57,13 @@
|
|||
</updateLog>
|
||||
</updateHandler>
|
||||
|
||||
<!-- realtime get handler, guaranteed to return the latest stored fields
|
||||
of any document, without the need to commit or open a new searcher. The current
|
||||
implementation relies on the updateLog feature being enabled. -->
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestDispatcher handleSelect="true" >
|
||||
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" formdataUploadLimitInKB="2048" />
|
||||
</requestDispatcher>
|
||||
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
|
||||
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
||||
<lst name="invariants">
|
||||
<str name="q">solrpingquery</str>
|
||||
</lst>
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">all</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- config for the admin interface -->
|
||||
<admin>
|
||||
<defaultQuery>solr</defaultQuery>
|
||||
|
|
|
@ -57,34 +57,13 @@
|
|||
</updateLog>
|
||||
</updateHandler>
|
||||
|
||||
<!-- realtime get handler, guaranteed to return the latest stored fields
|
||||
of any document, without the need to commit or open a new searcher. The current
|
||||
implementation relies on the updateLog feature being enabled. -->
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
||||
|
||||
<requestDispatcher handleSelect="true" >
|
||||
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" formdataUploadLimitInKB="2048" />
|
||||
</requestDispatcher>
|
||||
|
||||
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
|
||||
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
||||
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
||||
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
||||
|
||||
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
||||
<lst name="invariants">
|
||||
<str name="q">solrpingquery</str>
|
||||
</lst>
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">all</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!-- config for the admin interface -->
|
||||
<admin>
|
||||
|
|
|
@ -445,25 +445,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
||||
any document, without the need to commit or open a new searcher. The
|
||||
current implementation relies on the updateLog feature being enabled.
|
||||
|
||||
** WARNING **
|
||||
Do NOT disable the realtime get handler at /get if you are using
|
||||
SolrCloud otherwise any leader election will cause a full sync in ALL
|
||||
replicas for the shard in question. Similarly, a replica recovery will
|
||||
also always fetch the complete index from the leader because a partial
|
||||
sync will not be possible in the absence of this handler.
|
||||
-->
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
<str name="wt">json</str>
|
||||
<str name="indent">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!--
|
||||
The export request handler is used to export full sorted result sets.
|
||||
Do not change these defaults.
|
||||
|
@ -561,30 +542,6 @@
|
|||
class="solr.DocumentAnalysisRequestHandler"
|
||||
startup="lazy" />
|
||||
|
||||
<!-- Admin Handlers
|
||||
|
||||
Admin Handlers - This will register all the standard admin
|
||||
RequestHandlers.
|
||||
-->
|
||||
<requestHandler name="/admin/"
|
||||
class="solr.admin.AdminHandlers" />
|
||||
|
||||
<!-- ping/healthcheck -->
|
||||
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
||||
<lst name="invariants">
|
||||
<str name="q">solrpingquery</str>
|
||||
</lst>
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">all</str>
|
||||
</lst>
|
||||
<!-- An optional feature of the PingRequestHandler is to configure the
|
||||
handler with a "healthcheckFile" which can be used to enable/disable
|
||||
the PingRequestHandler.
|
||||
relative paths are resolved against the data dir
|
||||
-->
|
||||
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
||||
</requestHandler>
|
||||
|
||||
<!-- Echo the request contents back to the client -->
|
||||
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
||||
<lst name="defaults">
|
||||
|
@ -593,22 +550,7 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!-- Solr Replication
|
||||
|
||||
The SolrReplicationHandler supports replicating indexes from a
|
||||
"master" used for indexing and "slaves" used for queries.
|
||||
|
||||
http://wiki.apache.org/solr/SolrReplication
|
||||
|
||||
It is also necessary for SolrCloud to function (in Cloud mode, the
|
||||
replication handler is used to bulk transfer segments when nodes
|
||||
are added or need to recover).
|
||||
|
||||
https://wiki.apache.org/solr/SolrCloud/
|
||||
-->
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
||||
|
||||
</requestHandler>
|
||||
|
||||
<!-- Search Components
|
||||
|
||||
|
|
|
@ -860,20 +860,7 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
||||
any document, without the need to commit or open a new searcher. The
|
||||
current implementation relies on the updateLog feature being enabled. -->
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
<str name="wt">json</str>
|
||||
<str name="indent">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- A Robust Example
|
||||
<!-- A Robust Example
|
||||
|
||||
This example SearchHandler declaration shows off usage of the
|
||||
SearchHandler with many defaults declared
|
||||
|
@ -1057,13 +1044,6 @@
|
|||
class="solr.DocumentAnalysisRequestHandler"
|
||||
startup="lazy" />
|
||||
|
||||
<!-- Admin Handlers
|
||||
|
||||
Admin Handlers - This will register all the standard admin
|
||||
RequestHandlers.
|
||||
-->
|
||||
<requestHandler name="/admin/"
|
||||
class="solr.admin.AdminHandlers" />
|
||||
<!-- This single handler is equivalent to the following... -->
|
||||
<!--
|
||||
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
|
||||
|
@ -1073,34 +1053,8 @@
|
|||
<requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
|
||||
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
||||
-->
|
||||
<!-- If you wish to hide files under ${solr.home}/conf, explicitly
|
||||
register the ShowFileRequestHandler using:
|
||||
-->
|
||||
<!--
|
||||
<requestHandler name="/admin/file"
|
||||
class="solr.admin.ShowFileRequestHandler" >
|
||||
<lst name="invariants">
|
||||
<str name="hidden">synonyms.txt</str>
|
||||
<str name="hidden">anotherfile.txt</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
-->
|
||||
|
||||
<!-- ping/healthcheck -->
|
||||
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
||||
<lst name="invariants">
|
||||
<str name="q">solrpingquery</str>
|
||||
</lst>
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">all</str>
|
||||
</lst>
|
||||
<!-- An optional feature of the PingRequestHandler is to configure the
|
||||
handler with a "healthcheckFile" which can be used to enable/disable
|
||||
the PingRequestHandler.
|
||||
relative paths are resolved against the data dir
|
||||
-->
|
||||
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- Echo the request contents back to the client -->
|
||||
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
||||
|
|
|
@ -903,24 +903,6 @@
|
|||
</requestHandler>
|
||||
|
||||
|
||||
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
||||
any document, without the need to commit or open a new searcher. The
|
||||
current implementation relies on the updateLog feature being enabled.
|
||||
|
||||
** WARNING **
|
||||
Do NOT disable the realtime get handler at /get if you are using
|
||||
SolrCloud otherwise any leader election will cause a full sync in ALL
|
||||
replicas for the shard in question. Similarly, a replica recovery will
|
||||
also always fetch the complete index from the leader because a partial
|
||||
sync will not be possible in the absence of this handler.
|
||||
-->
|
||||
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
||||
<lst name="defaults">
|
||||
<str name="omitHeader">true</str>
|
||||
<str name="wt">json</str>
|
||||
<str name="indent">true</str>
|
||||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!--
|
||||
The export request handler is used to export full sorted result sets.
|
||||
|
@ -1171,13 +1153,6 @@
|
|||
class="solr.DocumentAnalysisRequestHandler"
|
||||
startup="lazy" />
|
||||
|
||||
<!-- Admin Handlers
|
||||
|
||||
Admin Handlers - This will register all the standard admin
|
||||
RequestHandlers.
|
||||
-->
|
||||
<requestHandler name="/admin/"
|
||||
class="solr.admin.AdminHandlers" />
|
||||
<!-- This single handler is equivalent to the following... -->
|
||||
<!--
|
||||
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
|
||||
|
@ -1215,21 +1190,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
-->
|
||||
<!-- ping/healthcheck -->
|
||||
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
||||
<lst name="invariants">
|
||||
<str name="q">solrpingquery</str>
|
||||
</lst>
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">all</str>
|
||||
</lst>
|
||||
<!-- An optional feature of the PingRequestHandler is to configure the
|
||||
handler with a "healthcheckFile" which can be used to enable/disable
|
||||
the PingRequestHandler.
|
||||
relative paths are resolved against the data dir
|
||||
-->
|
||||
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
||||
</requestHandler>
|
||||
|
||||
<!-- Echo the request contents back to the client -->
|
||||
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
||||
|
@ -1239,41 +1199,6 @@
|
|||
</lst>
|
||||
</requestHandler>
|
||||
|
||||
<!-- Solr Replication
|
||||
|
||||
The SolrReplicationHandler supports replicating indexes from a
|
||||
"master" used for indexing and "slaves" used for queries.
|
||||
|
||||
http://wiki.apache.org/solr/SolrReplication
|
||||
|
||||
It is also necessary for SolrCloud to function (in Cloud mode, the
|
||||
replication handler is used to bulk transfer segments when nodes
|
||||
are added or need to recover).
|
||||
|
||||
https://wiki.apache.org/solr/SolrCloud/
|
||||
-->
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
||||
<!--
|
||||
To enable simple master/slave replication, uncomment one of the
|
||||
sections below, depending on whether this solr instance should be
|
||||
the "master" or a "slave". If this instance is a "slave" you will
|
||||
also need to fill in the masterUrl to point to a real machine.
|
||||
-->
|
||||
<!--
|
||||
<lst name="master">
|
||||
<str name="replicateAfter">commit</str>
|
||||
<str name="replicateAfter">startup</str>
|
||||
<str name="confFiles">schema.xml,stopwords.txt</str>
|
||||
</lst>
|
||||
-->
|
||||
<!--
|
||||
<lst name="slave">
|
||||
<str name="masterUrl">http://your-master-hostname:8983/solr</str>
|
||||
<str name="pollInterval">00:00:60</str>
|
||||
</lst>
|
||||
-->
|
||||
</requestHandler>
|
||||
|
||||
<!-- Search Components
|
||||
|
||||
Search components are registered to SolrCore and used by
|
||||
|
|
Loading…
Reference in New Issue