@NotThreadSafe public class BasicTupleCollector extends LuceneQueryEngine.TupleCollector
BasicLuceneSchema does not store any fields in the indexes, with the exception of the document identifier in which
we're storing the key of the node that the document represents. Thus, in order to provide for each document the column values
for each tuple, this collector looks up the CachedNode for each tuple using the QueryContext's
RepositoryCache and then finds the property value for each required column.
In all cases, only the persisted workspace content appears in the indexes, so every Lucene Query only operates against
this persisted content. However, the query results might reflect either only the persisted workspace content or the session's
view of the content (which includes both its transient state as well as the persisted workspace content), depending upon
whether the QueryContext's NodeCache is actually a WorkspaceCache or a SessionCache.
This class's constructor prepares the information that's ncessary to access the tuple values as fast as possible.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BasicTupleCollector.LocalNameColumnAssignment |
protected static class |
BasicTupleCollector.NameColumnAssignment |
protected static class |
BasicTupleCollector.NodeDepthColumnAssignment |
protected static class |
BasicTupleCollector.PathColumnAssignment |
protected static class |
BasicTupleCollector.PseudoColumnAssignment |
protected static class |
BasicTupleCollector.ScoreColumnAssignment |
| Constructor and Description |
|---|
BasicTupleCollector(QueryContext queryContext,
QueryResults.Columns columns) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsDocsOutOfOrder() |
float |
doCollect(int doc) |
List<Object[]> |
getTuples()
Get the tuples.
|
void |
setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase) |
void |
setScorer(org.apache.lucene.search.Scorer scorer) |
collectpublic BasicTupleCollector(QueryContext queryContext, QueryResults.Columns columns)
public void setScorer(org.apache.lucene.search.Scorer scorer)
setScorer in class org.apache.lucene.search.Collectorpublic void setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
setNextReader in class org.apache.lucene.search.Collectorpublic boolean acceptsDocsOutOfOrder()
acceptsDocsOutOfOrder in class org.apache.lucene.search.Collectorpublic float doCollect(int doc)
throws IOException
doCollect in class LuceneQueryEngine.TupleCollectorIOExceptionpublic List<Object[]> getTuples()
LuceneQueryEngine.TupleCollectorgetTuples in class LuceneQueryEngine.TupleCollectorCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.