Index: conf/nutch-default.xml
===================================================================
--- conf/nutch-default.xml	(revision 593789)
+++ conf/nutch-default.xml	(working copy)
@@ -817,7 +817,7 @@
 
 <property>
   <name>plugin.includes</name>
-  <value>protocol-http|urlfilter-regex|parse-(text|html|js)|index-basic|query-(basic|site|url)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
+  <value>protocol-http|urlfilter-regex|parse-(text|html|js)|index-(basic|anchor)|query-(basic|site|url)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
   <description>Regular expression naming plugin directory names to
   include.  Any plugin not matching this expression is excluded.
   In any case you need at least include the nutch-extensionpoints plugin. By
Index: CHANGES.txt
===================================================================
--- CHANGES.txt	(revision 593788)
+++ CHANGES.txt	(working copy)
@@ -168,6 +168,9 @@
 
 58. NUTCH-494 - FindBugs: CrawlDbReader and DeleteDuplicates. (dogacan)
 
+59. NUTCH-574 - Including inlink anchor text in index can create irrelevant 
+    search results.  Created index-anchor plugin. (kubes)
+
 Release 0.9 - 2007-04-02
 
  1. Changed log4j confiquration to log to stdout on commandline
Index: src/plugin/index-anchor/plugin.xml
===================================================================
--- src/plugin/index-anchor/plugin.xml	(revision 0)
+++ src/plugin/index-anchor/plugin.xml	(revision 0)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<plugin
+   id="index-anchor"
+   name="Anchor Indexing Filter"
+   version="1.0.0"
+   provider-name="nutch.org">
+
+
+   <runtime>
+      <library name="index-anchor.jar">
+         <export name="*"/>
+      </library>
+   </runtime>
+
+   <requires>
+      <import plugin="nutch-extensionpoints"/>
+   </requires>
+
+   <extension id="org.apache.nutch.indexer.anchor"
+              name="Nutch Anchor Indexing Filter"
+              point="org.apache.nutch.indexer.IndexingFilter">
+      <implementation id="AnchorIndexingFilter"
+        class="org.apache.nutch.indexer.anchor.AnchorIndexingFilter"/>
+   </extension>
+
+</plugin>
\ No newline at end of file
Index: src/plugin/index-anchor/build.xml
===================================================================
--- src/plugin/index-anchor/build.xml	(revision 0)
+++ src/plugin/index-anchor/build.xml	(revision 0)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project name="index-anchor" default="jar-core">
+
+  <import file="../build-plugin.xml"/>
+
+</project>
Index: src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java
===================================================================
--- src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java	(revision 593788)
+++ src/plugin/index-basic/src/java/org/apache/nutch/indexer/basic/BasicIndexingFilter.java	(working copy)
@@ -34,7 +34,6 @@
 import org.apache.nutch.crawl.CrawlDatum;
 import org.apache.nutch.crawl.Inlinks;
 
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import org.apache.hadoop.conf.Configuration;
@@ -87,18 +86,6 @@
     // content is indexed, so that it's searchable, but not stored in index
     doc.add(new Field("content", parse.getText(), Field.Store.NO, Field.Index.TOKENIZED));
     
-    // anchors are indexed, so they're searchable, but not stored in index
-    try {
-      String[] anchors = (inlinks != null ? inlinks.getAnchors() : new String[0]);
-      for (int i = 0; i < anchors.length; i++) {
-        doc.add(new Field("anchor", anchors[i], Field.Store.NO, Field.Index.TOKENIZED));
-      }
-    } catch (IOException ioe) {
-      if (LOG.isWarnEnabled()) {
-        LOG.warn("BasicIndexingFilter: can't get anchors for " + url.toString());
-      }
-    }
-
     // title
     String title = parse.getData().getTitle();
     if (title.length() > MAX_TITLE_LENGTH) {      // truncate title if needed
Index: src/plugin/build.xml
===================================================================
--- src/plugin/build.xml	(revision 593788)
+++ src/plugin/build.xml	(working copy)
@@ -30,6 +30,7 @@
      <ant dir="creativecommons" target="deploy"/>
      <ant dir="feed" target="deploy"/>
      <ant dir="index-basic" target="deploy"/>
+  	 <ant dir="index-anchor" target="deploy"/>
      <ant dir="index-more" target="deploy"/>
      <ant dir="languageidentifier" target="deploy"/>
      <ant dir="lib-http" target="deploy"/>
@@ -121,6 +122,7 @@
     <ant dir="creativecommons" target="clean"/>
     <ant dir="feed" target="clean"/>
     <ant dir="index-basic" target="clean"/>
+  	<ant dir="index-anchor" target="clean"/>
     <ant dir="index-more" target="clean"/>
     <ant dir="languageidentifier" target="clean"/>
     <ant dir="lib-commons-httpclient" target="clean"/>
Index: build.xml
===================================================================
--- build.xml	(revision 593788)
+++ build.xml	(working copy)
@@ -157,6 +157,17 @@
   </target>
 
   <!-- ================================================================== -->
+  <!-- Make plugins jar                                                   -->
+  <!-- ================================================================== -->
+  <!--                                                                    -->
+  <!-- ================================================================== -->
+  <target name="pluginsjar" depends="compile">
+    <jar jarfile="${build.dir}/${final.name}-plugins.jar">
+      <zipfileset dir="${build.plugins}" prefix="plugins"/>
+    </jar>
+  </target>
+      	
+  <!-- ================================================================== -->
   <!-- Make nutch.war                                                     -->
   <!-- ================================================================== -->
   <!--                                                                    -->

