org.apache.jackrabbit.core.query.lucene
Class TermDocsCache

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.TermDocsCache

public class TermDocsCache
extends Object

TermDocsCache implements a cache for frequently read TermDocs.


Constructor Summary
TermDocsCache(org.apache.lucene.index.IndexReader reader, String field)
          Creates a new cache for the given reader and field.
 
Method Summary
 org.apache.lucene.index.TermDocs termDocs(org.apache.lucene.index.Term t)
          Returns the TermDocs for the given term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermDocsCache

public TermDocsCache(org.apache.lucene.index.IndexReader reader,
                     String field)
Creates a new cache for the given reader and field.

Parameters:
reader - the index reader.
field - the field name of the terms to potentially cache.
Method Detail

termDocs

public org.apache.lucene.index.TermDocs termDocs(org.apache.lucene.index.Term t)
                                          throws IOException
Returns the TermDocs for the given term.

Parameters:
t - the term.
Returns:
the term docs for the given term.
Throws:
IOException - if an error occurs while reading from the index.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.