Class TermDocsCache
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.TermDocsCache
-
public class TermDocsCache extends Object
TermDocsCache
implements a cache for frequently readTermDocs
.
-
-
Constructor Summary
Constructors Constructor Description TermDocsCache(org.apache.lucene.index.IndexReader reader, String field)
Creates a new cache for the givenreader
andfield
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.index.TermDocs
termDocs(org.apache.lucene.index.Term t)
Returns theTermDocs
for the given term.
-
-
-
Constructor Detail
-
TermDocsCache
public TermDocsCache(org.apache.lucene.index.IndexReader reader, String field)
Creates a new cache for the givenreader
andfield
.- 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 theTermDocs
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.
-
-