public class Join extends Object implements MultiColumnQueryHits
Join
implements the result of a join.Modifier and Type | Field and Description |
---|---|
protected List<ScoreNode[]> |
buffer
A buffer for joined score node rows.
|
protected Condition |
condition
The join condition.
|
protected ScoreNode[] |
emptyInnerHits
An array of empty inner query hits.
|
protected boolean |
innerJoin
Whether this is an inner join.
|
protected MultiColumnQueryHits |
outer
The outer query hits.
|
protected int |
outerScoreNodeIndex
The score node index of the outer query hits.
|
protected Name[] |
selectorNames
The selector names.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases resources held by this hits instance.
|
static Join |
create(MultiColumnQueryHits left,
MultiColumnQueryHits right,
JoinType joinType,
JoinConditionImpl condition,
org.apache.lucene.index.IndexReader reader,
HierarchyResolver resolver,
NamespaceMappings nsMappings,
HierarchyManager hmgr)
Creates a new join result.
|
protected static int |
getIndex(MultiColumnQueryHits source,
Name selectorName)
Returns the index of the selector with the given
selectorName
within the given source . |
Name[] |
getSelectorNames() |
int |
getSize()
This default implementation always returns
-1 . |
protected static MultiColumnQueryHits |
getSourceWithName(Name selectorName,
MultiColumnQueryHits left,
MultiColumnQueryHits right) |
ScoreNode[] |
nextScoreNodes()
Returns the next score nodes in this QueryHits or
null if
there are no more score nodes. |
void |
skip(int n)
Skips a
n score nodes. |
protected final MultiColumnQueryHits outer
protected final int outerScoreNodeIndex
protected final boolean innerJoin
protected final Condition condition
protected final Name[] selectorNames
protected final ScoreNode[] emptyInnerHits
public static Join create(MultiColumnQueryHits left, MultiColumnQueryHits right, JoinType joinType, JoinConditionImpl condition, org.apache.lucene.index.IndexReader reader, HierarchyResolver resolver, NamespaceMappings nsMappings, HierarchyManager hmgr) throws IOException
left
- the left query hits.right
- the right query hits.joinType
- the join type.condition
- the QOM join condition.reader
- the index reader.resolver
- the hierarchy resolver.nsMappings
- namespace mappings of this indexhmgr
- the hierarchy manager of the workspace.IOException
- if an error occurs while executing the join.public ScoreNode[] nextScoreNodes() throws IOException
null
if
there are no more score nodes.nextScoreNodes
in interface MultiColumnQueryHits
IOException
- if an error occurs while reading from the index.public Name[] getSelectorNames()
getSelectorNames
in interface MultiColumnQueryHits
ScoreNode
s
returned by MultiColumnQueryHits.nextScoreNodes()
.public void close() throws IOException
close
in interface CloseableHits
IOException
- if an error occurs while releasing resources.public int getSize()
-1
.getSize
in interface CloseableHits
-1
.public void skip(int n) throws IOException
n
score nodes.
Skips by calling nextScoreNodes()
n
times. Sub
classes may provide a more performance implementation.skip
in interface CloseableHits
n
- the number of score nodes to skip.IOException
- if an error occurs while skipping.protected static MultiColumnQueryHits getSourceWithName(Name selectorName, MultiColumnQueryHits left, MultiColumnQueryHits right)
protected static int getIndex(MultiColumnQueryHits source, Name selectorName)
selectorName
within the given source
.source
- a source.selectorName
- a selector name.-1
if the name does
not exist in source
.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.