1 /* Copyright (c) 2004 The Nutch Organization. All rights reserved. */ 2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */ 3 4 package net.nutch.searcher; 5 6 import org.apache.lucene.search.BooleanQuery; 7 8 /** Extension point for query translation. Permits one to add metadata to a 9 * query. All plugins found which implement this extension point are run 10 * sequentially on the query. 11 */ 12 public interface QueryFilter { 13 /** The name of the extension point. */ 14 final static String X_POINT_ID = QueryFilter.class.getName(); 15 16 /** Adds clauses or otherwise modifies the BooleanQuery that will be 17 * searched. */ 18 BooleanQuery filter(Query input, BooleanQuery translation) 19 throws QueryException; 20 } 21