mirror of
https://github.com/apache/lucene.git
synced 2025-02-28 05:19:17 +00:00
SOLR-1092 -- Added a new command named 'import' which does not automatically clean the index
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@770980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1b5873565
commit
99a48e5604
@ -139,6 +139,10 @@ New Features
|
||||
31.SOLR-1127: Add support for field name to be templatized.
|
||||
(Noble Paul, shalin)
|
||||
|
||||
32.SOLR-1092: Added a new command named 'import' which does not automatically clean the index. This is useful and
|
||||
more appropriate when one needs to import only some of the entities.
|
||||
(Noble Paul via shalin)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
1. SOLR-846: Reduce memory consumption during delta import by removing keys when used
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.apache.solr.handler.dataimport;
|
||||
|
||||
import static org.apache.solr.handler.dataimport.DataImporter.IMPORT_CMD;
|
||||
import org.apache.solr.common.SolrException;
|
||||
import org.apache.solr.common.SolrInputDocument;
|
||||
import org.apache.solr.common.params.CommonParams;
|
||||
@ -171,7 +172,8 @@ public class DataImportHandler extends RequestHandlerBase implements
|
||||
message = DataImporter.MSG.CMD_RUNNING;
|
||||
} else if (command != null) {
|
||||
if (DataImporter.FULL_IMPORT_CMD.equals(command)
|
||||
|| DataImporter.DELTA_IMPORT_CMD.equals(command)) {
|
||||
|| DataImporter.DELTA_IMPORT_CMD.equals(command) ||
|
||||
IMPORT_CMD.equals(command)) {
|
||||
|
||||
UpdateRequestProcessorChain processorChain =
|
||||
req.getCore().getUpdateProcessingChain(params.get(UpdateParams.UPDATE_PROCESSOR));
|
||||
|
@ -480,7 +480,7 @@ public class DataImporter {
|
||||
verbose = "true".equals(requestParams.get("verbose"))
|
||||
|| "on".equals(requestParams.get("verbose"));
|
||||
}
|
||||
if (DELTA_IMPORT_CMD.equals(command)) {
|
||||
if (DELTA_IMPORT_CMD.equals(command) || IMPORT_CMD.equals(command)) {
|
||||
clean = false;
|
||||
}
|
||||
if (requestParams.containsKey("commit"))
|
||||
@ -539,6 +539,8 @@ public class DataImporter {
|
||||
|
||||
public static final String FULL_IMPORT_CMD = "full-import";
|
||||
|
||||
public static final String IMPORT_CMD = "import";
|
||||
|
||||
public static final String DELTA_IMPORT_CMD = "delta-import";
|
||||
|
||||
public static final String ABORT_CMD = "abort";
|
||||
|
Loading…
x
Reference in New Issue
Block a user