anl.aida.ae.lucene
Class FieldFilter

java.lang.Object
  extended by anl.aida.ae.lucene.FieldFilter
All Implemented Interfaces:
Filter<org.apache.lucene.index.Term>

public class FieldFilter
extends java.lang.Object
implements Filter<org.apache.lucene.index.Term>

Filters Terms based on their field.


Field Summary
private  java.util.Set<java.lang.String> fields
           
 
Constructor Summary
FieldFilter(java.lang.String... fields)
          Creates a FieldFilter that will pass a terms if its field is one of the specified fields.
 
Method Summary
 boolean evaluate(org.apache.lucene.index.Term item)
          Evaluates the term against its field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fields

private java.util.Set<java.lang.String> fields
Constructor Detail

FieldFilter

public FieldFilter(java.lang.String... fields)
Creates a FieldFilter that will pass a terms if its field is one of the specified fields.

Parameters:
fields - the allowable fields.
Method Detail

evaluate

public boolean evaluate(org.apache.lucene.index.Term item)
Evaluates the term against its field.

Specified by:
evaluate in interface Filter<org.apache.lucene.index.Term>
Parameters:
item - the item to evaluate
Returns:
true if the term's field is a member of the allowable fields, otherwise false.