Index: src/java/org/apache/nutch/searcher/TranslatingRawFieldQueryFilter.java
===================================================================
--- src/java/org/apache/nutch/searcher/TranslatingRawFieldQueryFilter.java	(revision 0)
+++ src/java/org/apache/nutch/searcher/TranslatingRawFieldQueryFilter.java	(revision 0)
@@ -0,0 +1,124 @@
+/**
+ * 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.searcher;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BooleanClause;
+import org.apache.lucene.search.BooleanQuery;
+import org.apache.lucene.search.TermQuery;
+import org.apache.nutch.searcher.Query;
+import org.apache.nutch.searcher.QueryException;
+import org.apache.nutch.searcher.QueryFilter;
+import org.apache.nutch.searcher.Query.Clause;
+
+/**
+ * Similar to {@link RawFieldQueryFilter} except that the index 
+ * and query field names can be different. 
+ * <br>
+ * This class can be extended by <code>QueryFilter</code>s to allow 
+ * searching a field in the index, but using another field name in the 
+ * search. 
+ * <br>
+ * For example index field names can be kept in english such as "content", 
+ * "lang", "title", ..., however query filters can be build in other languages 
+ *  
+ * @author Enis Soztutar &lt;enis.soz.nutch@gmail.com&gt;
+ */
+public abstract class TranslatingRawFieldQueryFilter implements QueryFilter {
+
+  private Configuration conf;
+  private String queryFieldName; //the field name to match to the query  
+  private String indexFieldName;  //the field name of the field in the index
+  private boolean lowerCase;
+  private float boost;
+  
+  public TranslatingRawFieldQueryFilter(String indexFieldName, String queryFieldName) {
+    this(indexFieldName, queryFieldName, true);
+  }
+
+  public TranslatingRawFieldQueryFilter(String indexFieldName, String queryFieldName
+      , float boost) {
+    this(indexFieldName, queryFieldName, true, boost);
+  }
+
+  public TranslatingRawFieldQueryFilter(String indexFieldName, String queryFieldName
+      , boolean lowerCase) {
+    this(indexFieldName, queryFieldName, lowerCase, 0.0f);
+  }
+
+  public TranslatingRawFieldQueryFilter(String indexFieldName, String queryFieldName
+      , boolean lowerCase, float boost) {
+    this.queryFieldName = queryFieldName;
+    this.indexFieldName = indexFieldName;
+    this.boost = boost;
+    this.lowerCase = lowerCase;
+  }
+
+  public Configuration getConf() {
+    return conf;
+  }
+
+  public void setConf(Configuration conf) {
+    this.conf = conf;
+  }
+  
+  protected void setBoost(float boost) {
+    this.boost = boost;
+  }
+
+  public BooleanQuery filter(Query input, BooleanQuery output)
+  throws QueryException {
+  
+  // examine each clause in the Nutch query
+  Clause[] clauses = input.getClauses();
+  for (int i = 0; i < clauses.length; i++) {
+    Clause c = clauses[i];
+
+    // skip non-matching clauses
+    if (!c.getField().equals(queryFieldName))
+      continue;
+
+    // get the field value from the clause
+    // raw fields are guaranteed to be Terms, not Phrases
+    String value = c.getTerm().toString();
+    if (lowerCase)
+      value = value.toLowerCase();
+
+    // add a Lucene TermQuery for this clause
+    TermQuery clause = new TermQuery(new Term(indexFieldName, value));
+    // set boost
+    clause.setBoost(boost);
+    // add it as specified in query
+    
+    output.add(clause, 
+        (c.isProhibited()
+            ? BooleanClause.Occur.MUST_NOT
+            : (c.isRequired()
+                ? BooleanClause.Occur.MUST
+                : BooleanClause.Occur.SHOULD
+               )
+         ));
+  }
+  
+  // return the modified Lucene query
+  return output;
+}
+  
+  
+  
+}
