Apache Lucene open-source search software
SOLR-6294 ,SOLR-6302
Noble Paulde86f763f59e
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex f90cd70644a..27add9f73a4 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -166,6 +166,12 @@ New Featuresa UUID into the unique Key field.(Vitaliy Zhovtyuk, hossman, Steve Rowe, Erik Hatcher, shalin)+* SOLR-6294: Remove the restriction of adding json by only wrapping it in an array in a+ new path /update/json/docs (Noble Paul , hossman, Yonik Seeley, Steve Rowe)++* SOLR-6302: UpdateRequestHandlers are registered implicitly /update ,+ /update/json, /update/csv , /update/json/docs (Noble Paul)+Bug Fixes----------------------diff --git a/solr/contrib/morphlines-core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/contrib/morphlines-core/src/test-files/solr/collection1/conf/solrconfig.xmlindex e5bbb521ad6..ced08c3e073 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/collection1/conf/solrconfig.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/collection1/conf/solrconfig.xml@@ -947,8 +947,8 @@</requestHandler>- <!-- Update Request Handler.-+ <!-- Update Request Handler.+http://wiki.apache.org/solr/UpdateXmlMessagesThe canonical Request Handler for Modifying the Index through@@ -957,17 +957,17 @@Note: Since solr1.1 requestHandlers requires a valid contenttype header if posted in the body. For example, curl nowrequires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:++ To override the request content type and force a specific+ Content-type, use the request parameter:?update.contentType=text/csv-+This handler will pick a response format to match the inputif the 'wt' parameter is not explicit--><requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name+ <!-- See below for information on defining+ updateRequestProcessorChains that can be used by nameon each Update Request--><!--@@ -976,19 +976,6 @@</lst>--></requestHandler>-- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.CSVRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Field Analysis Request HandlerRequestHandler that provides much the same functionality asdiff --git a/solr/contrib/morphlines-core/src/test-files/solr/minimr/conf/solrconfig.xml b/solr/contrib/morphlines-core/src/test-files/solr/minimr/conf/solrconfig.xmlindex 22cdc83e63f..1bd0a9dd81a 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/minimr/conf/solrconfig.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/minimr/conf/solrconfig.xml@@ -965,8 +965,8 @@</requestHandler>- <!-- Update Request Handler.-+ <!-- Update Request Handler.+http://wiki.apache.org/solr/UpdateXmlMessagesThe canonical Request Handler for Modifying the Index through@@ -975,17 +975,17 @@Note: Since solr1.1 requestHandlers requires a valid contenttype header if posted in the body. For example, curl nowrequires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:++ To override the request content type and force a specific+ Content-type, use the request parameter:?update.contentType=text/csv-+This handler will pick a response format to match the inputif the 'wt' parameter is not explicit--><requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name+ <!-- See below for information on defining+ updateRequestProcessorChains that can be used by nameon each Update Request--><!--@@ -995,18 +995,6 @@--></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.CSVRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Field Analysis Request HandlerRequestHandler that provides much the same functionality asdiff --git a/solr/contrib/morphlines-core/src/test-files/solr/mrunit/conf/solrconfig.xml b/solr/contrib/morphlines-core/src/test-files/solr/mrunit/conf/solrconfig.xmlindex ed6d87c9cab..2807a8a4701 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/mrunit/conf/solrconfig.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/mrunit/conf/solrconfig.xml@@ -970,48 +970,6 @@</requestHandler>- <!-- Update Request Handler.-- http://wiki.apache.org/solr/UpdateXmlMessages-- The canonical Request Handler for Modifying the Index through- commands specified using XML, JSON, CSV, or JAVABIN-- Note: Since solr1.1 requestHandlers requires a valid content- type header if posted in the body. For example, curl now- requires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:- ?update.contentType=text/csv-- This handler will pick a response format to match the input- if the 'wt' parameter is not explicit- -->- <requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name- on each Update Request- -->- <!--- <lst name="defaults">- <str name="update.chain">dedupe</str>- </lst>- -->- </requestHandler>-- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.CSVRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Field Analysis Request HandlerRequestHandler that provides much the same functionality asdiff --git a/solr/contrib/morphlines-core/src/test-files/solr/solrcloud/conf/solrconfig.xml b/solr/contrib/morphlines-core/src/test-files/solr/solrcloud/conf/solrconfig.xmlindex f89d77b8c69..0e00fd78201 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/solrcloud/conf/solrconfig.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/solrcloud/conf/solrconfig.xml@@ -967,49 +967,6 @@</arr></requestHandler>-- <!-- Update Request Handler.-- http://wiki.apache.org/solr/UpdateXmlMessages-- The canonical Request Handler for Modifying the Index through- commands specified using XML, JSON, CSV, or JAVABIN-- Note: Since solr1.1 requestHandlers requires a valid content- type header if posted in the body. For example, curl now- requires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:- ?update.contentType=text/csv-- This handler will pick a response format to match the input- if the 'wt' parameter is not explicit- -->- <requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name- on each Update Request- -->- <!--- <lst name="defaults">- <str name="update.chain">dedupe</str>- </lst>- -->- </requestHandler>-- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.CSVRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Field Analysis Request HandlerRequestHandler that provides much the same functionality asdiff --git a/solr/core/src/java/org/apache/solr/core/RequestHandlers.java b/solr/core/src/java/org/apache/solr/core/RequestHandlers.javaindex 90fac1b4e07..574d318b236 100644--- a/solr/core/src/java/org/apache/solr/core/RequestHandlers.java+++ b/solr/core/src/java/org/apache/solr/core/RequestHandlers.java@@ -18,9 +18,12 @@package org.apache.solr.core;import java.net.URL;+import java.util.ArrayList;import java.util.Collections;import java.util.HashMap;import java.util.LinkedHashMap;+import java.util.LinkedList;+import java.util.List;import java.util.Map;import java.util.concurrent.ConcurrentHashMap;@@ -135,10 +138,12 @@ public final class RequestHandlers {* Handlers will be registered and initialized in the order they appear in solrconfig.xml*/- void initHandlersFromConfig(SolrConfig config ){+ void initHandlersFromConfig(SolrConfig config, List<PluginInfo> implicits){// use link map so we iterate in the same orderMap<PluginInfo,SolrRequestHandler> handlers = new LinkedHashMap<>();- for (PluginInfo info : config.getPluginInfos(SolrRequestHandler.class.getName())) {+ ArrayList<PluginInfo> infos = new ArrayList<>(implicits);+ infos.addAll(config.getPluginInfos(SolrRequestHandler.class.getName()));+ for (PluginInfo info : infos) {try {SolrRequestHandler requestHandler;String startup = info.attributes.get("startup") ;diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.javaindex e151c22d9eb..b08a0cb624e 100644--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java@@ -39,6 +39,7 @@ import org.apache.solr.common.util.NamedList;import org.apache.solr.common.util.SimpleOrderedMap;import org.apache.solr.core.DirectoryFactory.DirContext;import org.apache.solr.handler.SnapPuller;+import org.apache.solr.handler.UpdateRequestHandler;import org.apache.solr.handler.admin.ShowFileRequestHandler;import org.apache.solr.handler.component.AnalyticsComponent;import org.apache.solr.handler.component.DebugComponent;@@ -802,7 +803,9 @@ public final class SolrCore implements SolrInfoMBean, Closeable {// Processors initialized before the handlersupdateProcessorChains = loadUpdateProcessorChains();reqHandlers = new RequestHandlers(this);- reqHandlers.initHandlersFromConfig(solrConfig);+ List<PluginInfo> implicitReqHandlerInfo = new ArrayList<>();+ UpdateRequestHandler.addImplicits(implicitReqHandlerInfo);+ reqHandlers.initHandlersFromConfig(solrConfig, implicitReqHandlerInfo);// Handle things that should eventually go awayinitDeprecatedSupport();diff --git a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.javaindex ed193bf44d7..2e6cf5ce11a 100644--- a/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/UpdateRequestHandler.java@@ -17,12 +17,15 @@package org.apache.solr.handler;+import java.util.ArrayList;import java.util.Collections;import java.util.HashMap;+import java.util.List;import java.util.Map;import org.apache.solr.common.SolrException;import org.apache.solr.common.SolrException.ErrorCode;+import org.apache.solr.common.cloud.ZkNodeProps;import org.apache.solr.common.params.CommonParams;import org.apache.solr.common.params.MapSolrParams;import org.apache.solr.common.params.ModifiableSolrParams;@@ -30,6 +33,7 @@ import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.params.UpdateParams;import org.apache.solr.common.util.ContentStream;import org.apache.solr.common.util.NamedList;+import org.apache.solr.core.PluginInfo;import org.apache.solr.handler.loader.CSVLoader;import org.apache.solr.handler.loader.ContentStreamLoader;import org.apache.solr.handler.loader.JavabinLoader;@@ -41,6 +45,9 @@ import org.apache.solr.update.processor.UpdateRequestProcessor;import org.slf4j.Logger;import org.slf4j.LoggerFactory;+import static java.util.Collections.singletonMap;+import static org.apache.solr.common.cloud.ZkNodeProps.makeMap;+/*** UpdateHandler that uses content-type to pick the right Loader*/@@ -57,9 +64,9 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {public static final String SOFT_COMMIT = "softCommit";public static final String OVERWRITE = "overwrite";-+public static final String VERSION = "version";-+// NOTE: This constant is for use with the <add> XML tag, not the HTTP param with same namepublic static final String COMMIT_WITHIN = "commitWithin";@@ -69,7 +76,7 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {@Overridepublic void load(SolrQueryRequest req, SolrQueryResponse rsp,ContentStream stream, UpdateRequestProcessor processor) throws Exception {-+String type = req.getParams().get(UpdateParams.ASSUME_CONTENT_TYPE);if(type == null) {type = stream.getContentType();@@ -91,7 +98,7 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {}loader.load(req, rsp, stream, processor);}-+private void setDefaultWT(SolrQueryRequest req, ContentStreamLoader loader) {SolrParams params = req.getParams();if( params.get(CommonParams.WT) == null ) {@@ -100,21 +107,21 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {if(req.getCore().getQueryResponseWriter(wt)!=null) {Map<String,String> map = new HashMap<>(1);map.put(CommonParams.WT, wt);- req.setParams(SolrParams.wrapDefaults(params,+ req.setParams(SolrParams.wrapDefaults(params,new MapSolrParams(map)));}}}};-+@Overridepublic void init(NamedList args) {super.init(args);-+// Since backed by a non-thread safe Map, it should not be modifiableloaders = Collections.unmodifiableMap(createDefaultLoaders(args));}-+protected void setAssumeContentType(String ct) {if(invariants==null) {Map<String,String> map = new HashMap<>();@@ -127,7 +134,7 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {invariants = params;}}-+protected Map<String,ContentStreamLoader> createDefaultLoaders(NamedList args) {SolrParams p = null;if(args!=null) {@@ -143,13 +150,13 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {registry.put("text/json", registry.get("application/json") );return registry;}-+@Overrideprotected ContentStreamLoader newLoader(SolrQueryRequest req, final UpdateRequestProcessor processor) {return instance;}-+//////////////////////// SolrInfoMBeans methods //////////////////////@Override@@ -161,6 +168,20 @@ public class UpdateRequestHandler extends ContentStreamHandlerBase {public String getSource() {return "$URL$";}++ public static void addImplicits(List<PluginInfo> implicits) {+ implicits.add(getPluginInfo("/update",Collections.emptyMap()));+ implicits.add(getPluginInfo("/update/json", singletonMap("update.contentType", "application/json")));+ implicits.add(getPluginInfo("/update/csv", singletonMap("update.contentType", "application/csv")));+ implicits.add(getPluginInfo("/update/json/docs", 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);++ }+}diff --git a/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java b/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.javaindex 8c9bd188abf..bec442f72eb 100644--- a/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java+++ b/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java@@ -109,6 +109,10 @@ public class JsonLoader extends ContentStreamLoader {@SuppressWarnings("fallthrough")void processUpdate() throws IOException{+ if("false".equals( req.getParams().get("json.command"))){+ handleStreamingSingleDocs();+ return;+ }int ev = parser.nextEvent();while( ev != JSONParser.EOF ) {@@ -178,6 +182,26 @@ public class JsonLoader extends ContentStreamLoader {}}+ private void handleStreamingSingleDocs() throws IOException+ {+ while( true ) {+ int ev = parser.nextEvent();+ if(ev == JSONParser.EOF) return;+ if(ev == JSONParser.OBJECT_START) {+ assertEvent(ev, JSONParser.OBJECT_START);+ AddUpdateCommand cmd = new AddUpdateCommand(req);+ cmd.commitWithin = commitWithin;+ cmd.overwrite = overwrite;+ cmd.solrDoc = parseDoc(ev);+ processor.processAdd(cmd);+ } else if(ev == JSONParser.ARRAY_START){+ handleAdds();+ } else{+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unexpected event :"+ev);+ }+ }+ }+//// "delete":"id"// "delete":["id1","id2"]@@ -384,10 +408,10 @@ public class JsonLoader extends ContentStreamLoader {AddUpdateCommand cmd = new AddUpdateCommand(req);cmd.commitWithin = commitWithin;cmd.overwrite = overwrite;-+int ev = parser.nextEvent();if (ev == JSONParser.ARRAY_END) break;-+assertEvent(ev, JSONParser.OBJECT_START);cmd.solrDoc = parseDoc(ev);processor.processAdd(cmd);diff --git a/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java b/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.javaindex 3bb981d9f52..9bd8dbc501d 100644--- a/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java+++ b/solr/core/src/test/org/apache/solr/core/RequestHandlersTest.java@@ -38,6 +38,14 @@ public class RequestHandlersTest extends SolrTestCaseJ4 {1, handler.getStatistics().get("initCount"));}+ @Test+ public void testImplicitRequestHandlers(){+ SolrCore core = h.getCore();+ assertNotNull(core.getRequestHandler( "/update/json"));+ assertNotNull(core.getRequestHandler( "/update/json/docs"));+ assertNotNull(core.getRequestHandler( "/update/csv"));+ }+@Testpublic void testLazyLoading() {SolrCore core = h.getCore();diff --git a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.javaindex 50d0cbc4921..ab3f0318556 100644--- a/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java+++ b/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java@@ -255,6 +255,48 @@ public class JsonLoaderTest extends SolrTestCaseJ4 {req.close();}+ public void testJsonDocFormat() throws Exception{+ String doc = "\n" ++ "\n" ++ "{\"bool\": true,\n" ++ " \"f0\": \"v0\",\n" ++ " \"f2\": {\n" ++ " \t \"boost\": 2.3,\n" ++ " \t \"value\": \"test\"\n" ++ " \t },\n" ++ "\"array\": [ \"aaa\", \"bbb\" ],\n" ++ "\"boosted\": {\n" ++ " \t \"boost\": 6.7,\n" ++ " \t \"value\": [ \"aaa\", \"bbb\" ]\n" ++ " \t }\n" ++ " }\n" ++ "\n" ++ "\n" ++ " {\"f1\": \"v1\",\n" ++ " \"f1\": \"v2\",\n" ++ " \"f2\": null\n" ++ " }\n";+ SolrQueryRequest req = req("json.command","false");+ SolrQueryResponse rsp = new SolrQueryResponse();+ BufferingRequestProcessor p = new BufferingRequestProcessor(null);+ JsonLoader loader = new JsonLoader();+ loader.load(req, rsp, new ContentStreamBase.StringStream(doc), p);+++ assertEquals( 2, p.addCommands.size() );+++ doc = "[{'id':'1'},{'id':'2'}]".replace('\'', '"');+ req = req("json.command","false");+ rsp = new SolrQueryResponse();+ p = new BufferingRequestProcessor(null);+ loader = new JsonLoader();+ loader.load(req, rsp, new ContentStreamBase.StringStream(doc), p);+ assertEquals( 2, p.addCommands.size() );+++ }+public void testExtendedFieldValues() throws Exception {diff --git a/solr/example/example-DIH/solr/db/conf/solrconfig.xml b/solr/example/example-DIH/solr/db/conf/solrconfig.xmlindex 1c6459b8c41..8c11c1ce5f4 100755--- a/solr/example/example-DIH/solr/db/conf/solrconfig.xml+++ b/solr/example/example-DIH/solr/db/conf/solrconfig.xml@@ -1013,8 +1013,8 @@</requestHandler>- <!-- Update Request Handler.-+ <!-- Update Request Handler.+http://wiki.apache.org/solr/UpdateXmlMessagesThe canonical Request Handler for Modifying the Index through@@ -1023,17 +1023,17 @@Note: Since solr1.1 requestHandlers requires a valid contenttype header if posted in the body. For example, curl nowrequires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:++ To override the request content type and force a specific+ Content-type, use the request parameter:?update.contentType=text/csv-+This handler will pick a response format to match the inputif the 'wt' parameter is not explicit--><requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name+ <!-- See below for information on defining+ updateRequestProcessorChains that can be used by nameon each Update Request--><!--@@ -1043,17 +1043,7 @@--></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>+<!-- Solr Cell Update Request Handlerdiff --git a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml b/solr/example/example-DIH/solr/mail/conf/solrconfig.xmlindex 282ff5e6b35..47afed3f510 100755--- a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml+++ b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml@@ -1015,49 +1015,6 @@</arr></requestHandler>-- <!-- Update Request Handler.-- http://wiki.apache.org/solr/UpdateXmlMessages-- The canonical Request Handler for Modifying the Index through- commands specified using XML, JSON, CSV, or JAVABIN-- Note: Since solr1.1 requestHandlers requires a valid content- type header if posted in the body. For example, curl now- requires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:- ?update.contentType=text/csv-- This handler will pick a response format to match the input- if the 'wt' parameter is not explicit- -->- <requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name- on each Update Request- -->- <!--- <lst name="defaults">- <str name="update.chain">dedupe</str>- </lst>- -->- </requestHandler>-- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Solr Cell Update Request Handlerhttp://wiki.apache.org/solr/ExtractingRequestHandlerdiff --git a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml b/solr/example/example-DIH/solr/rss/conf/solrconfig.xmlindex 4687ef7cc3e..c675f4e5583 100755--- a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml+++ b/solr/example/example-DIH/solr/rss/conf/solrconfig.xml@@ -1013,48 +1013,6 @@</requestHandler>- <!-- Update Request Handler.-- http://wiki.apache.org/solr/UpdateXmlMessages-- The canonical Request Handler for Modifying the Index through- commands specified using XML, JSON, CSV, or JAVABIN-- Note: Since solr1.1 requestHandlers requires a valid content- type header if posted in the body. For example, curl now- requires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:- ?update.contentType=text/csv-- This handler will pick a response format to match the input- if the 'wt' parameter is not explicit- -->- <requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name- on each Update Request- -->- <!--- <lst name="defaults">- <str name="update.chain">dedupe</str>- </lst>- -->- </requestHandler>-- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Solr Cell Update Request Handlerhttp://wiki.apache.org/solr/ExtractingRequestHandlerdiff --git a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml b/solr/example/example-DIH/solr/solr/conf/solrconfig.xmlindex 9e3277e11b2..d9d43a678b3 100755--- a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml+++ b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml@@ -1043,18 +1043,6 @@--></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler>-<!-- Solr Cell Update Request Handlerhttp://wiki.apache.org/solr/ExtractingRequestHandlerdiff --git a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml b/solr/example/example-DIH/solr/tika/conf/solrconfig.xmlindex 47aa881b019..de39a4771fc 100755--- a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml+++ b/solr/example/example-DIH/solr/tika/conf/solrconfig.xml@@ -1016,8 +1016,8 @@</requestHandler>- <!-- Update Request Handler.-+ <!-- Update Request Handler.+http://wiki.apache.org/solr/UpdateXmlMessagesThe canonical Request Handler for Modifying the Index through@@ -1026,17 +1026,17 @@Note: Since solr1.1 requestHandlers requires a valid contenttype header if posted in the body. For example, curl nowrequires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:++ To override the request content type and force a specific+ Content-type, use the request parameter:?update.contentType=text/csv-+This handler will pick a response format to match the inputif the 'wt' parameter is not explicit--><requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name+ <!-- See below for information on defining+ updateRequestProcessorChains that can be used by nameon each Update Request--><!--@@ -1046,17 +1046,6 @@--></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- </lst>- </requestHandler><!-- Solr Cell Update Request Handlerdiff --git a/solr/example/example-schemaless/solr/collection1/conf/solrconfig.xml b/solr/example/example-schemaless/solr/collection1/conf/solrconfig.xmlindex cd991efd12f..9009bbe7899 100755--- a/solr/example/example-schemaless/solr/collection1/conf/solrconfig.xml+++ b/solr/example/example-schemaless/solr/collection1/conf/solrconfig.xml@@ -1001,20 +1001,6 @@</lst></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->- <requestHandler name="/update/json" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/json</str>- <str name="update.chain">add-unknown-fields-to-the-schema</str>- </lst>- </requestHandler>- <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">- <lst name="defaults">- <str name="stream.contentType">application/csv</str>- <str name="update.chain">add-unknown-fields-to-the-schema</str>- </lst>- </requestHandler>-<!-- Solr Cell Update Request Handlerhttp://wiki.apache.org/solr/ExtractingRequestHandlerdiff --git a/solr/example/solr/collection1/conf/solrconfig.xml b/solr/example/solr/collection1/conf/solrconfig.xmlindex a8c48bafca7..9a6fed6feb7 100755--- a/solr/example/solr/collection1/conf/solrconfig.xml+++ b/solr/example/solr/collection1/conf/solrconfig.xml@@ -1011,8 +1011,8 @@</requestHandler>- <!-- Update Request Handler.-+ <!-- Update Request Handler.+http://wiki.apache.org/solr/UpdateXmlMessagesThe canonical Request Handler for Modifying the Index through@@ -1021,17 +1021,17 @@Note: Since solr1.1 requestHandlers requires a valid contenttype header if posted in the body. For example, curl nowrequires: -H 'Content-type:text/xml; charset=utf-8'-- To override the request content type and force a specific- Content-type, use the request parameter:++ To override the request content type and force a specific+ Content-type, use the request parameter:?update.contentType=text/csv-+This handler will pick a response format to match the inputif the 'wt' parameter is not explicit--><requestHandler name="/update" class="solr.UpdateRequestHandler">- <!-- See below for information on defining- updateRequestProcessorChains that can be used by name+ <!-- See below for information on defining+ updateRequestProcessorChains that can be used by nameon each Update Request--><!--@@ -1041,7 +1041,7 @@--></requestHandler>- <!-- for back compat with clients using /update/json and /update/csv -->+ <!-- The following are implicitly added<requestHandler name="/update/json" class="solr.UpdateRequestHandler"><lst name="defaults"><str name="stream.contentType">application/json</str>@@ -1052,6 +1052,7 @@<str name="stream.contentType">application/csv</str></lst></requestHandler>+ --><!-- Solr Cell Update Request Handler