From 3f62c69a91baa6757b48a2281fa400ee2b844437 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Sat, 20 Sep 2008 14:48:54 +0000 Subject: [PATCH] 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 --- contrib/dataimporthandler/CHANGES.txt | 25 ++++++++++++++++++- .../solr/handler/dataimport/DataImporter.java | 4 +-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/contrib/dataimporthandler/CHANGES.txt b/contrib/dataimporthandler/CHANGES.txt index 7f586385719..34f3a1ae9ff 100644 --- a/contrib/dataimporthandler/CHANGES.txt +++ b/contrib/dataimporthandler/CHANGES.txt @@ -9,7 +9,30 @@ HTTP data sources quick and easy. $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 ------ diff --git a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java index 071d8e5d52c..376b7b0885b 100644 --- a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java +++ b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java @@ -350,9 +350,7 @@ public class DataImporter { try { if (requestParams.commit) { - Date lastModified = writer.loadIndexStartTime(); setIndexStartTime(new Date()); - setLastIndexTime(lastModified); } docBuilder = new DocBuilder(this, writer, requestParams, variables); docBuilder.execute(config.documents.get(0).name); @@ -381,6 +379,8 @@ public class DataImporter { void runCmd(RequestParams reqParams, SolrWriter sw, Map variables) { String command = reqParams.command; + Date lastModified = sw.loadIndexStartTime(); + setLastIndexTime(lastModified); if (command.equals("full-import")) { doFullImport(sw, reqParams, variables); } else if (command.equals(DELTA_IMPORT_CMD)) {