org.LexGrid.LexBIG.Impl.helpers
Class ScoredQueryFilter
java.lang.Object
org.apache.lucene.search.Filter
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 . |
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 |
ScoredQueryFilter
public ScoredQueryFilter(org.apache.lucene.search.Query query)
- Constructs a filter which only matches documents matching
query
.
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