|
||||||||||
| 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, org.apache.lucene.index.IndexReader.ReaderFinishedListener |
| 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, readerFinishedListeners |
| 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()
|
void |
clearRuntimeFacetHandler()
|
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,Object> |
getRuntimeFacetDataMap()
|
RuntimeFacetHandler<?> |
getRuntimeFacetHandler(String name)
|
Map<String,RuntimeFacetHandlerFactory<?,?>> |
getRuntimeFacetHandlerFactoryMap()
|
Map<String,RuntimeFacetHandler<?>> |
getRuntimeFacetHandlerMap()
|
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)
|
void |
setRuntimeFacetDataMap(Map<String,Object> map)
|
void |
setRuntimeFacetHandlerMap(Map<String,RuntimeFacetHandler<?>> map)
|
| Methods inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
addReaderFinishedListener, docFreq, document, doSetNorm, doUndeleteAll, getCommitUserData, getCoreCacheKey, getDeletesCacheKey, getFieldNames, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, removeReaderFinishedListener, termDocs, termDocs, termPositions, terms, terms, toString |
| Methods inherited from class org.apache.lucene.index.IndexReader |
|---|
acquireWriteLock, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, main, notifyReaderFinishedListeners, numDeletedDocs, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, readerFinished, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, 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()
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.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 Map<String,RuntimeFacetHandler<?>> getRuntimeFacetHandlerMap()
public Map<String,Object> getRuntimeFacetDataMap()
public void setRuntimeFacetHandlerMap(Map<String,RuntimeFacetHandler<?>> map)
public void setRuntimeFacetDataMap(Map<String,Object> map)
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 | |||||||||