public class TermDocsCache extends Object
TermDocsCache
implements a cache for frequently read
TermDocs
.Constructor and Description |
---|
TermDocsCache(org.apache.lucene.index.IndexReader reader,
String field)
Creates a new cache for the given
reader and
field . |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.index.TermDocs |
termDocs(org.apache.lucene.index.Term t)
Returns the
TermDocs for the given term. |
public TermDocsCache(org.apache.lucene.index.IndexReader reader, String field)
reader
and
field
.reader
- the index reader.field
- the field name of the terms to potentially cache.public org.apache.lucene.index.TermDocs termDocs(org.apache.lucene.index.Term t) throws IOException
TermDocs
for the given term.t
- the term.IOException
- if an error occurs while reading from the index.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.