You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2010/10/28 22:55:36 UTC

svn commit: r1028474 - in /nutch/trunk: CHANGES.txt ivy/ivy.xml src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java

Author: ab
Date: Thu Oct 28 20:55:36 2010
New Revision: 1028474

URL: http://svn.apache.org/viewvc?rev=1028474&view=rev
Log:
NUTCH-930 Remove remaining dependencies on Lucene API.

Modified:
    nutch/trunk/CHANGES.txt
    nutch/trunk/ivy/ivy.xml
    nutch/trunk/src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java

Modified: nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1028474&r1=1028473&r2=1028474&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Thu Oct 28 20:55:36 2010
@@ -84,6 +84,7 @@ Release 2.0 - Current Development
 
 * NUTCH-880 REST API for Nutch (ab)
 
+* NUTCH-930 Remove remaining dependencies on Lucene API (ab)
 
 Release 1.1 - 2010-06-06
 

Modified: nutch/trunk/ivy/ivy.xml
URL: http://svn.apache.org/viewvc/nutch/trunk/ivy/ivy.xml?rev=1028474&r1=1028473&r2=1028474&view=diff
==============================================================================
--- nutch/trunk/ivy/ivy.xml (original)
+++ nutch/trunk/ivy/ivy.xml Thu Oct 28 20:55:36 2010
@@ -58,8 +58,6 @@
 		</dependency>
 
 		<dependency org="com.ibm.icu" name="icu4j" rev="4.0.1" />
-		<dependency org="org.apache.lucene" name="lucene-core" rev="3.0.2"/> 
-		<dependency org="org.apache.lucene" name="lucene-misc" rev="3.0.2"/>
 		<dependency org="org.apache.tika" name="tika-core" rev="0.7" />
 		<dependency org="org.apache.tika" name="tika-parsers" rev="0.7" >
 			<exclude org="com.sun.jdmk"/>

Modified: nutch/trunk/src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java
URL: http://svn.apache.org/viewvc/nutch/trunk/src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java?rev=1028474&r1=1028473&r2=1028474&view=diff
==============================================================================
--- nutch/trunk/src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java (original)
+++ nutch/trunk/src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java Thu Oct 28 20:55:36 2010
@@ -21,12 +21,12 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.ByteBuffer;
 import java.util.Collection;
+import java.util.Date;
 import java.util.HashSet;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.lucene.document.DateTools;
 import org.apache.nutch.indexer.IndexingException;
 import org.apache.nutch.indexer.IndexingFilter;
 import org.apache.nutch.indexer.NutchDocument;
@@ -34,6 +34,7 @@ import org.apache.nutch.metadata.Nutch;
 import org.apache.nutch.storage.WebPage;
 import org.apache.nutch.util.Bytes;
 import org.apache.nutch.util.TableUtil;
+import org.apache.solr.common.util.DateUtil;
 
 /** Adds basic searchable fields to a document. */
 public class BasicIndexingFilter implements IndexingFilter {
@@ -106,8 +107,8 @@ public class BasicIndexingFilter impleme
     }
 
     // add timestamp when fetched, for deduplication
-    doc.add("tstamp", DateTools.timeToString(page.getFetchTime(),
-        DateTools.Resolution.MILLISECOND));
+    String tstamp = DateUtil.getThreadLocalDateFormat().format(new Date(page.getFetchTime()));
+    doc.add("tstamp", tstamp);
 
     return doc;
   }