Index: src/plugin/index-anchor/src/java/org/apache/nutch/indexer/anchor/AnchorIndexingFilter.java
===================================================================
--- src/plugin/index-anchor/src/java/org/apache/nutch/indexer/anchor/AnchorIndexingFilter.java	(revision 1180009)
+++ src/plugin/index-anchor/src/java/org/apache/nutch/indexer/anchor/AnchorIndexingFilter.java	(working copy)
@@ -38,11 +38,14 @@
   public static final Logger LOG = LoggerFactory.getLogger(AnchorIndexingFilter.class);
   private Configuration conf;
   private boolean deduplicate = false;
+  private boolean addNumInlinks = false;
 
   public void setConf(Configuration conf) {
     this.conf = conf;
 
     deduplicate = conf.getBoolean("anchorIndexingFilter.deduplicate", false);
+    addNumInlinks = conf.getBoolean("anchorIndexingFilter.add.num.inlinks", false);
+
     LOG.info("Anchor deduplication is: " + (deduplicate ? "on" : "off"));
   }
 
@@ -75,6 +78,12 @@
       }
     }
 
+    // Add the number of inlinks
+    // https://issues.apache.org/jira/browse/NUTCH-1151
+    if (addNumInlinks) {
+      doc.add("numInlinks", anchors.length);
+    }
+
     return doc;
   }
 
Index: conf/nutch-default.xml
===================================================================
--- conf/nutch-default.xml	(revision 1180009)
+++ conf/nutch-default.xml	(working copy)
@@ -754,6 +754,14 @@
   </description>
 </property>
 
+<property>
+  <name>anchorIndexingFilter.add.num.inlinks</name>
+  <value>false</value>
+  <description>When enabled the plugin will add a numInlinks field to the index. This can be
+  used to calculate the authority for a given document.
+  </description>
+</property>
+
 <!-- indexingfilter plugin properties -->
 
 <property>
Index: conf/schema.xml
===================================================================
--- conf/schema.xml	(revision 1180009)
+++ conf/schema.xml	(working copy)
@@ -30,7 +30,9 @@
 <schema name="nutch" version="1.4">
     <types>
         <fieldType name="string" class="solr.StrField" sortMissingLast="true"
-            omitNorms="true"/> 
+            omitNorms="true"/>
+        <fieldType name="int" class="solr.TrieIntField" precisionStep="0"
+            omitNorms="true" positionIncrementGap="0"/>
         <fieldType name="long" class="solr.TrieLongField" precisionStep="0"
             omitNorms="true" positionIncrementGap="0"/>
         <fieldType name="float" class="solr.TrieFloatField" precisionStep="0"
@@ -85,6 +87,7 @@
         <!-- fields for index-anchor plugin -->
         <field name="anchor" type="string" stored="true" indexed="true"
             multiValued="true"/>
+        <field name="numInlinks" type="int" stored="false" indexed="true"/>
 
         <!-- fields for index-more plugin -->
         <field name="type" type="string" stored="true" indexed="true"
