mirror of https://github.com/apache/lucene.git
SOLR-3036: Ability to specify overwrite=false on the URL for XML updates.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1231514 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5ca66287ea
commit
2504985445
|
@ -427,6 +427,10 @@ New Features
|
|||
|
||||
* SOLR-2906: Added LFU cache options to Solr. (Shawn Heisey via Erick Erickson)
|
||||
|
||||
* SOLR-3036: Ability to specify overwrite=false on the URL for XML updates.
|
||||
(Sami Siren via yonik)
|
||||
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
* SOLR-1931: Speedup for LukeRequestHandler and admin/schema browser. New parameter
|
||||
|
@ -436,6 +440,7 @@ Optimizations
|
|||
* SOLR-3012: Move System.getProperty("type") in postData() to main() and add type argument so that
|
||||
the client applications of SimplePostTool can set content type via method argument. (koji)
|
||||
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
* SOLR-2912: Fixed File descriptor leak in ShowFileRequestHandler (Michael Ryan, shalin)
|
||||
|
|
|
@ -112,6 +112,7 @@ class XMLLoader extends ContentStreamLoader {
|
|||
|
||||
// First look for commitWithin parameter on the request, will be overwritten for individual <add>'s
|
||||
addCmd.commitWithin = params.getInt(UpdateParams.COMMIT_WITHIN, -1);
|
||||
addCmd.overwrite = params.getBool(UpdateParams.OVERWRITE, true);
|
||||
|
||||
for (int i = 0; i < parser.getAttributeCount(); i++) {
|
||||
String attrName = parser.getAttributeLocalName(i);
|
||||
|
|
|
@ -80,7 +80,7 @@ public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testCommitWithin() throws Exception
|
||||
public void testRequestParams() throws Exception
|
||||
{
|
||||
String xml =
|
||||
"<add>" +
|
||||
|
@ -90,7 +90,7 @@ public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
" </doc>" +
|
||||
"</add>";
|
||||
|
||||
SolrQueryRequest req = req("commitWithin","100");
|
||||
SolrQueryRequest req = req("commitWithin","100","overwrite","false");
|
||||
SolrQueryResponse rsp = new SolrQueryResponse();
|
||||
BufferingRequestProcessor p = new BufferingRequestProcessor(null);
|
||||
|
||||
|
@ -98,8 +98,8 @@ public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
loader.load(req, rsp, new ContentStreamBase.StringStream(xml));
|
||||
|
||||
AddUpdateCommand add = p.addCommands.get(0);
|
||||
assertEquals(add.commitWithin, 100);
|
||||
|
||||
assertEquals(100, add.commitWithin);
|
||||
assertEquals(false, add.overwrite);
|
||||
req.close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue