public class BoboIndexReader
extends org.apache.lucene.index.FilterIndexReader
| Modifier and Type | Class and Description |
|---|---|
static class |
BoboIndexReader.WorkArea
Work area for loading
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,FacetHandler<?>> |
_facetHandlerMap |
protected Collection<FacetHandler<?>> |
_facetHandlers |
protected Collection<RuntimeFacetHandlerFactory<?,?>> |
_runtimeFacetHandlerFactories |
protected Map<String,RuntimeFacetHandlerFactory<?,?>> |
_runtimeFacetHandlerFactoryMap |
protected org.apache.lucene.index.IndexReader |
_srcReader |
protected int[] |
_starts |
protected BoboIndexReader[] |
_subReaders |
protected BoboIndexReader.WorkArea |
_workArea |
| Modifier | Constructor and Description |
|---|---|
protected |
BoboIndexReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea) |
protected |
BoboIndexReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea,
boolean useSubReaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearRuntimeFacetData() |
void |
clearRuntimeFacetHandler() |
BoboIndexReader |
copy(org.apache.lucene.index.IndexReader in) |
org.apache.lucene.store.Directory |
directory() |
protected void |
doClose() |
protected void |
doCommit(Map commitUserData) |
protected void |
doDelete(int n) |
void |
dumpFields(File outFile)
Utility method to dump out all fields (name and terms) for a given index.
|
protected void |
facetInit() |
protected void |
facetInit(Set<String> toBeRemoved) |
org.apache.lucene.document.Document |
fillFacetData(int docid,
org.apache.lucene.document.Document doc) |
Object |
getFacetData(String name) |
FacetHandler<?> |
getFacetHandler(String fieldname)
Gets a facet handler
|
Map<String,FacetHandler<?>> |
getFacetHandlerMap()
Gets the facet handler map
|
Set<String> |
getFacetNames()
Gets all the facet field names
|
org.apache.lucene.search.Query |
getFastMatchAllDocsQuery()
Deprecated.
use
MatchAllDocsQuery instead. |
org.apache.lucene.index.IndexReader |
getInnerReader() |
static BoboIndexReader |
getInstance(org.apache.lucene.index.IndexReader reader)
Constructor
|
static BoboIndexReader |
getInstance(org.apache.lucene.index.IndexReader reader,
BoboIndexReader.WorkArea workArea) |
static BoboIndexReader |
getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers) |
static BoboIndexReader |
getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories)
Constructor.
|
static BoboIndexReader |
getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea) |
static BoboIndexReader |
getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader) |
static BoboIndexReader |
getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories) |
static BoboIndexReader |
getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea) |
Object |
getRuntimeFacetData(String name) |
RuntimeFacetHandler<?> |
getRuntimeFacetHandler(String name) |
Map<String,RuntimeFacetHandlerFactory<?,?>> |
getRuntimeFacetHandlerFactoryMap() |
org.apache.lucene.index.IndexReader[] |
getSequentialSubReaders() |
long |
getVersion() |
protected void |
initialize(Collection<FacetHandler<?>> facetHandlers) |
Object |
putFacetData(String name,
Object data) |
Object |
putRuntimeFacetData(String name,
Object data) |
void |
putRuntimeFacetHandler(String name,
RuntimeFacetHandler<?> data) |
org.apache.lucene.index.IndexReader |
reopen() |
org.apache.lucene.index.IndexReader |
reopen(boolean openReadOnly) |
protected void |
setFacetHandlers(Collection<FacetHandler<?>> facetHandlers) |
docFreq, document, doSetNorm, doUndeleteAll, getCommitUserData, getCoreCacheKey, getDeletesCacheKey, getFieldInfos, getIndexCommit, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getTermInfosIndexDivisor, getUniqueTermCount, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termDocs, termPositions, terms, terms, toStringacquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getRefCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAllprotected Map<String,FacetHandler<?>> _facetHandlerMap
protected Collection<FacetHandler<?>> _facetHandlers
protected Collection<RuntimeFacetHandlerFactory<?,?>> _runtimeFacetHandlerFactories
protected Map<String,RuntimeFacetHandlerFactory<?,?>> _runtimeFacetHandlerFactoryMap
protected BoboIndexReader.WorkArea _workArea
protected org.apache.lucene.index.IndexReader _srcReader
protected BoboIndexReader[] _subReaders
protected int[] _starts
protected BoboIndexReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea)
throws IOException
reader - facetHandlers - facetHandlerFactories - workArea - IOExceptionprotected BoboIndexReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea,
boolean useSubReaders)
throws IOException
reader - facetHandlers - facetHandlerFactories - workArea - useSubReaders - true => we create a MultiReader of all the leaf sub-readers as
the inner reader. false => we use the given reader as the inner reader.IOExceptionpublic static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader) throws IOException
reader - Index readerIOExceptionpublic static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader, BoboIndexReader.WorkArea workArea) throws IOException
IOExceptionpublic static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader, Collection<FacetHandler<?>> facetHandlers, Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories) throws IOException
reader - index readerfacetHandlers - List of facet handlersIOExceptionpublic static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader, Collection<FacetHandler<?>> facetHandlers) throws IOException
IOExceptionpublic static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader, Collection<FacetHandler<?>> facetHandlers, Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories, BoboIndexReader.WorkArea workArea) throws IOException
IOExceptionpublic static BoboIndexReader getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader) throws IOException
IOExceptionpublic static BoboIndexReader getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader, Collection<FacetHandler<?>> facetHandlers, Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories) throws IOException
IOExceptionpublic static BoboIndexReader getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader, Collection<FacetHandler<?>> facetHandlers, Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories, BoboIndexReader.WorkArea workArea) throws IOException
IOExceptionpublic long getVersion()
getVersion in class org.apache.lucene.index.FilterIndexReaderpublic org.apache.lucene.index.IndexReader getInnerReader()
public org.apache.lucene.index.IndexReader reopen()
throws org.apache.lucene.index.CorruptIndexException,
IOException
reopen in class org.apache.lucene.index.IndexReaderorg.apache.lucene.index.CorruptIndexExceptionIOExceptionpublic org.apache.lucene.index.IndexReader reopen(boolean openReadOnly)
throws org.apache.lucene.index.CorruptIndexException,
IOException
reopen in class org.apache.lucene.index.IndexReaderorg.apache.lucene.index.CorruptIndexExceptionIOExceptionpublic void clearRuntimeFacetData()
public RuntimeFacetHandler<?> getRuntimeFacetHandler(String name)
public void putRuntimeFacetHandler(String name, RuntimeFacetHandler<?> data)
public void clearRuntimeFacetHandler()
protected void doClose()
throws IOException
doClose in class org.apache.lucene.index.FilterIndexReaderIOExceptionprotected void doCommit(Map commitUserData) throws IOException
doCommit in class org.apache.lucene.index.FilterIndexReaderIOExceptionprotected void doDelete(int n)
throws org.apache.lucene.index.CorruptIndexException,
IOException
doDelete in class org.apache.lucene.index.FilterIndexReaderorg.apache.lucene.index.CorruptIndexExceptionIOExceptionpublic org.apache.lucene.store.Directory directory()
directory in class org.apache.lucene.index.FilterIndexReaderprotected void initialize(Collection<FacetHandler<?>> facetHandlers) throws IOException
IOExceptionprotected void facetInit()
throws IOException
IOExceptionprotected void facetInit(Set<String> toBeRemoved) throws IOException
IOExceptionprotected void setFacetHandlers(Collection<FacetHandler<?>> facetHandlers)
public org.apache.lucene.search.Query getFastMatchAllDocsQuery()
MatchAllDocsQuery instead.public void dumpFields(File outFile) throws IOException
outFile - File to dump to.IOExceptionpublic Set<String> getFacetNames()
public FacetHandler<?> getFacetHandler(String fieldname)
fieldname - namepublic org.apache.lucene.index.IndexReader[] getSequentialSubReaders()
getSequentialSubReaders in class org.apache.lucene.index.FilterIndexReaderpublic Map<String,FacetHandler<?>> getFacetHandlerMap()
public Map<String,RuntimeFacetHandlerFactory<?,?>> getRuntimeFacetHandlerFactoryMap()
public org.apache.lucene.document.Document fillFacetData(int docid,
org.apache.lucene.document.Document doc)
throws IOException
IOExceptionpublic BoboIndexReader copy(org.apache.lucene.index.IndexReader in)
Copyright © 2005–2013. All rights reserved.