org.LexGrid.LexBIG.Impl.helpers
Class ScoredQueryFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.LexGrid.LexBIG.Impl.helpers.ScoredQueryFilter
All Implemented Interfaces:
java.io.Serializable

public class ScoredQueryFilter
extends org.apache.lucene.search.Filter

Class to search a lucene index, but the result is a bit set that indicates yes or no as to which documents satisfy the query. Results are cached, so that searches after the first on the same index using this filter are much faster. It also keeps track of the Score of each item in the bitset. This is code is heavily borrowed from the QueryFilter class in Lucene.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust, Jesse Erdmann
See Also:
Serialized Form

Constructor Summary
ScoredQueryFilter(org.apache.lucene.search.Query query)
          Constructs a filter which only matches documents matching query.
 
Method Summary
 ScoredBitSet bits(org.apache.lucene.index.IndexReader reader)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScoredQueryFilter

public ScoredQueryFilter(org.apache.lucene.search.Query query)
Constructs a filter which only matches documents matching query.

Method Detail

bits

public ScoredBitSet bits(org.apache.lucene.index.IndexReader reader)
                  throws java.io.IOException
Overrides:
bits in class org.apache.lucene.search.Filter
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.