|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.index.IndexReader
org.apache.lucene.index.FilterIndexReader
com.browseengine.bobo.api.BoboIndexReader
public class BoboIndexReader
bobo browse index reader
| Nested Class Summary | |
|---|---|
static class |
BoboIndexReader.WorkArea
Work area for loading |
| Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
org.apache.lucene.index.FilterIndexReader.FilterTermDocs, org.apache.lucene.index.FilterIndexReader.FilterTermEnum, org.apache.lucene.index.FilterIndexReader.FilterTermPositions |
| Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader |
|---|
org.apache.lucene.index.IndexReader.FieldOption |
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
in |
| Fields inherited from class org.apache.lucene.index.IndexReader |
|---|
hasChanges |
| Constructor Summary | |
|---|---|
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)
|
| Method Summary | |
|---|---|
void |
clearRuntimeFacetData()
|
BoboIndexReader |
copy(org.apache.lucene.index.IndexReader in)
|
org.apache.lucene.store.Directory |
directory()
|
protected void |
doClose()
|
protected void |
doCommit(Map commitUserData)
|
org.apache.lucene.document.Document |
document(int docid)
|
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)
|
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)
|
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)
|
org.apache.lucene.index.IndexReader |
reopen()
|
org.apache.lucene.index.IndexReader |
reopen(boolean openReadOnly)
|
void |
rewrap(org.apache.lucene.index.IndexReader in)
|
protected void |
setFacetHandlers(Collection<FacetHandler<?>> facetHandlers)
|
| Methods inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
docFreq, document, doSetNorm, doUndeleteAll, getDeletesCacheKey, getFieldCacheKey, getFieldNames, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termDocs, termPositions, terms, terms |
| Methods inherited from class org.apache.lucene.index.IndexReader |
|---|
acquireWriteLock, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCurrentVersion, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, main, numDeletedDocs, open, open, open, open, open, open, open, reopen, setNorm, setNorm, termPositions, undeleteAll |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected 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
| Constructor Detail |
|---|
protected BoboIndexReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea)
throws IOException
reader - facetHandlers - facetHandlerFactories - workArea -
IOException
protected 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.
IOException| Method Detail |
|---|
public static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader)
throws IOException
reader - Index reader
IOException
public static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader,
BoboIndexReader.WorkArea workArea)
throws IOException
IOException
public static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories)
throws IOException
reader - index readerfacetHandlers - List of facet handlers
IOException
public static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers)
throws IOException
IOException
public static BoboIndexReader getInstance(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories,
BoboIndexReader.WorkArea workArea)
throws IOException
IOException
public static BoboIndexReader getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader)
throws IOException
IOException
public static BoboIndexReader getInstanceAsSubReader(org.apache.lucene.index.IndexReader reader,
Collection<FacetHandler<?>> facetHandlers,
Collection<RuntimeFacetHandlerFactory<?,?>> facetHandlerFactories)
throws IOException
IOException
public 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.CorruptIndexException
IOException
public 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.CorruptIndexException
IOExceptionpublic Object getFacetData(String name)
public Object putFacetData(String name,
Object data)
public Object getRuntimeFacetData(String name)
public Object putRuntimeFacetData(String name,
Object data)
public void clearRuntimeFacetData()
protected void doClose()
throws IOException
doClose in class org.apache.lucene.index.FilterIndexReaderIOException
protected void doCommit(Map commitUserData)
throws IOException
doCommit in class org.apache.lucene.index.FilterIndexReaderIOException
protected void doDelete(int n)
throws org.apache.lucene.index.CorruptIndexException,
IOException
doDelete in class org.apache.lucene.index.FilterIndexReaderorg.apache.lucene.index.CorruptIndexException
IOExceptionpublic org.apache.lucene.store.Directory directory()
directory in class org.apache.lucene.index.FilterIndexReader
protected void initialize(Collection<FacetHandler<?>> facetHandlers)
throws IOException
IOException
protected void facetInit()
throws IOException
IOException
protected 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 - name
public org.apache.lucene.index.IndexReader[] getSequentialSubReaders()
getSequentialSubReaders in class org.apache.lucene.index.FilterIndexReaderpublic Map<String,FacetHandler<?>> getFacetHandlerMap()
public Map<String,RuntimeFacetHandlerFactory<?,?>> getRuntimeFacetHandlerFactoryMap()
public void rewrap(org.apache.lucene.index.IndexReader in)
public org.apache.lucene.document.Document document(int docid)
throws IOException
document in class org.apache.lucene.index.IndexReaderIOExceptionpublic BoboIndexReader copy(org.apache.lucene.index.IndexReader in)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||