SOLR-768 -- Set last_index_time variable in full-import command.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@697373 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2008-09-20 14:48:54 +00:00
parent a61088f009
commit 3f62c69a91
2 changed files with 26 additions and 3 deletions

View File

@ -9,7 +9,30 @@ HTTP data sources quick and easy.
$Id$ $Id$
================== Release 1.3-dev ================== ================== Release 1.4-dev ==================
Upgrading from Solr 1.3
-----------------------
Detailed Change List
----------------------
New Features
----------------------
1. SOLR-768: Set last_index_time variable in full-import command.
(Wojtek Piaseczny, Noble Paul via shalin)
Optimizations
----------------------
Bug Fixes
----------------------
Documentation
----------------------
================== Release 1.3.0 20080915 ==================
Status Status
------ ------

View File

@ -350,9 +350,7 @@ public class DataImporter {
try { try {
if (requestParams.commit) { if (requestParams.commit) {
Date lastModified = writer.loadIndexStartTime();
setIndexStartTime(new Date()); setIndexStartTime(new Date());
setLastIndexTime(lastModified);
} }
docBuilder = new DocBuilder(this, writer, requestParams, variables); docBuilder = new DocBuilder(this, writer, requestParams, variables);
docBuilder.execute(config.documents.get(0).name); docBuilder.execute(config.documents.get(0).name);
@ -381,6 +379,8 @@ public class DataImporter {
void runCmd(RequestParams reqParams, SolrWriter sw, void runCmd(RequestParams reqParams, SolrWriter sw,
Map<String, String> variables) { Map<String, String> variables) {
String command = reqParams.command; String command = reqParams.command;
Date lastModified = sw.loadIndexStartTime();
setLastIndexTime(lastModified);
if (command.equals("full-import")) { if (command.equals("full-import")) {
doFullImport(sw, reqParams, variables); doFullImport(sw, reqParams, variables);
} else if (command.equals(DELTA_IMPORT_CMD)) { } else if (command.equals(DELTA_IMPORT_CMD)) {