Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-514 - Indexer should only index pages with fetch status SUCCESS.

Tacettin Guney9e37db6a2ea5
diff --git a/CHANGES.txt b/CHANGES.txt
index 84fc86a1f..094ffabbf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -102,6 +102,11 @@ Unreleased changes (1.0-dev)
34. NUTCH-525 - DeleteDuplicates generates ArrayIndexOutOfBoundsException
when trying to rerun dedup on a segment. (Vishal Shah via dogacan)
+35. NUTCH-514 - Indexer should only index pages with fetch status SUCCESS.
+ (dogacan) Note: There is a bigger problem, i.e how to deal
+ with redirected pages, and this issue can be considered as a band-aid
+ for the time being. See NUTCH-273 and NUTCH-353 for more details.
+
Release 0.9 - 2007-04-02
1. Changed log4j confiquration to log to stdout on commandline
diff --git a/src/java/org/apache/nutch/indexer/Indexer.java b/src/java/org/apache/nutch/indexer/Indexer.java
index e1174c765..80959f5fb 100644
--- a/src/java/org/apache/nutch/indexer/Indexer.java
+++ b/src/java/org/apache/nutch/indexer/Indexer.java
@@ -214,7 +214,8 @@ public class Indexer extends ToolBase implements Reducer, Mapper {
return; // only have inlinks
}
- if (!parseData.getStatus().isSuccess()) {
+ if (!parseData.getStatus().isSuccess() ||
+ fetchDatum.getStatus() != CrawlDatum.STATUS_FETCH_SUCCESS) {
return;
}