Index: src/plugin/build.xml
===================================================================
--- src/plugin/build.xml	(revision 1051557)
+++ src/plugin/build.xml	(working copy)
@@ -51,7 +51,8 @@
      <ant dir="parse-zip" target="deploy"/>
      <ant dir="scoring-opic" target="deploy"/>
      <ant dir="scoring-link" target="deploy"/>
-     <ant dir="subcollection" target="deploy"/>
+     <ant dir="static-field" target="deploy"/>
+	 <ant dir="subcollection" target="deploy"/>
      <ant dir="tld" target="deploy"/>
      <ant dir="urlfilter-automaton" target="deploy"/>
      <ant dir="urlfilter-domain" target="deploy" />
Index: src/plugin/static-field/ivy.xml
===================================================================
--- src/plugin/static-field/ivy.xml	(revision 0)
+++ src/plugin/static-field/ivy.xml	(revision 0)
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<ivy-module version="1.0">
+  <info organisation="org.apache.nutch" module="${ant.project.name}">
+    <license name="Apache 2.0"/>
+    <ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/>
+    <description>
+        Apache Nutch
+    </description>
+  </info>
+
+  <configurations>
+    <include file="${nutch.root}/ivy/ivy-configurations.xml"/>
+  </configurations>
+
+  <publications>
+    <!--get the artifact from our module name-->
+    <artifact conf="master"/>
+  </publications>
+
+  <dependencies>
+  </dependencies>
+  
+</ivy-module>
Index: src/plugin/static-field/src/java/org/apache/nutch/indexer/staticfield/StaticFieldIndexer.java
===================================================================
--- src/plugin/static-field/src/java/org/apache/nutch/indexer/staticfield/StaticFieldIndexer.java	(revision 0)
+++ src/plugin/static-field/src/java/org/apache/nutch/indexer/staticfield/StaticFieldIndexer.java	(revision 0)
@@ -0,0 +1,78 @@
+/**
+ * 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.
+ */
+
+package org.apache.nutch.indexer.staticfield;
+
+import java.util.HashMap;
+import java.util.Map.Entry;
+
+import org.apache.nutch.crawl.CrawlDatum;
+import org.apache.nutch.crawl.Inlinks;
+import org.apache.nutch.indexer.IndexingFilter;
+import org.apache.nutch.indexer.IndexingException;
+import org.apache.nutch.indexer.NutchDocument;
+import org.apache.nutch.parse.Parse;
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.conf.Configuration;
+
+
+
+
+public class StaticFieldIndexer implements IndexingFilter {
+	private Configuration conf;
+	private HashMap<String, String> fields;
+	private boolean addStaticFields = false;
+
+	public NutchDocument filter(NutchDocument doc, Parse parse, Text url, CrawlDatum datum, Inlinks inlinks)
+	    throws IndexingException {
+		
+		if(this.addStaticFields == true){
+			for(Entry<String,String> entry: this.fields.entrySet()){
+				doc.add(entry.getKey(), entry.getValue());
+			}
+		}	
+		return doc;
+	}
+
+	private HashMap<String, String> parseFields(String fieldsString) {
+		HashMap<String, String> fields = new HashMap<String, String>();
+		
+		/*
+		  The format is very easy, it's a comma-separated list of fields in the form <name>:<value>
+		*/
+		for(String field: fieldsString.split(",")){
+			String[] entry = field.split(":");
+			if(entry.length == 2)//might be malformed
+				fields.put(entry[0].trim(), entry[1].trim());
+		}
+
+		return fields;
+	}
+
+	public void setConf(Configuration conf) {
+		this.conf = conf;
+		String fieldsString = conf.get("index.static.fields", null);
+		if(fieldsString != null){
+			this.addStaticFields = true;
+			this.fields = parseFields(fieldsString);
+		}
+	}
+
+	public Configuration getConf() {
+		return this.conf;
+	}
+}
Index: src/plugin/static-field/plugin.xml
===================================================================
--- src/plugin/static-field/plugin.xml	(revision 0)
+++ src/plugin/static-field/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="static-field"
+   name="Static Field"
+   version="1.0.0"
+   provider-name="nutch.org">
+
+    <runtime>
+      <library name="static-field.jar">
+         <export name="*"/>
+      </library>
+   </runtime>
+
+   <requires>
+      <import plugin="nutch-extensionpoints"/>
+   </requires>
+
+
+   <extension id="org.apache.nutch.indexer.staticfield"
+              name="Nutch static field adder"
+              point="org.apache.nutch.indexer.IndexingFilter">
+      <implementation id="StaticField"
+                      class="org.apache.nutch.indexer.staticfield.StaticFieldIndexer"/>
+   </extension>
+
+</plugin>
Index: src/plugin/static-field/build.xml
===================================================================
--- src/plugin/static-field/build.xml	(revision 0)
+++ src/plugin/static-field/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="static-field" default="jar-core">
+
+  <import file="../build-plugin.xml"/>
+
+</project>
