public class ChildrenQuery
extends org.apache.lucene.search.Query
ParentChildIndexFieldData
.
This query is executed in two rounds. The first round resolves all the matching child documents and groups these
documents by parent uid value. Also the child scores are aggregated per parent uid value. During the second round
all parent documents having the same uid value that is collected in the first phase are emitted as hit including
a score based on the aggregated child scores and score type.Modifier and Type | Class and Description |
---|---|
protected static class |
ChildrenQuery.ParentCollector |
protected static class |
ChildrenQuery.ParentScoreCollector |
protected static class |
ChildrenQuery.ParentScoreCountCollector |
protected class |
ChildrenQuery.ParentWeight |
Modifier and Type | Field and Description |
---|---|
protected String |
childType |
protected ParentChildIndexFieldData |
ifd |
protected int |
maxChildren |
protected int |
minChildren |
protected FixedBitSetFilter |
nonNestedDocsFilter |
protected org.apache.lucene.search.Query |
originalChildQuery |
protected org.apache.lucene.search.Filter |
parentFilter |
protected String |
parentType |
protected org.apache.lucene.index.IndexReader |
rewriteIndexReader |
protected org.apache.lucene.search.Query |
rewrittenChildQuery |
protected ScoreType |
scoreType |
protected int |
shortCircuitParentDocSet |
Constructor and Description |
---|
ChildrenQuery(ParentChildIndexFieldData ifd,
String parentType,
String childType,
org.apache.lucene.search.Filter parentFilter,
org.apache.lucene.search.Query childQuery,
ScoreType scoreType,
int minChildren,
int maxChildren,
int shortCircuitParentDocSet,
FixedBitSetFilter nonNestedDocsFilter) |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Query |
clone() |
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.IndexSearcher searcher) |
boolean |
equals(Object obj) |
void |
extractTerms(Set<org.apache.lucene.index.Term> terms) |
int |
hashCode() |
org.apache.lucene.search.Query |
rewrite(org.apache.lucene.index.IndexReader reader) |
String |
toString(String field) |
protected final ParentChildIndexFieldData ifd
protected final String parentType
protected final String childType
protected final org.apache.lucene.search.Filter parentFilter
protected final ScoreType scoreType
protected org.apache.lucene.search.Query originalChildQuery
protected final int minChildren
protected final int maxChildren
protected final int shortCircuitParentDocSet
protected final FixedBitSetFilter nonNestedDocsFilter
protected org.apache.lucene.search.Query rewrittenChildQuery
protected org.apache.lucene.index.IndexReader rewriteIndexReader
public ChildrenQuery(ParentChildIndexFieldData ifd, String parentType, String childType, org.apache.lucene.search.Filter parentFilter, org.apache.lucene.search.Query childQuery, ScoreType scoreType, int minChildren, int maxChildren, int shortCircuitParentDocSet, FixedBitSetFilter nonNestedDocsFilter)
public boolean equals(Object obj)
equals
in class org.apache.lucene.search.Query
public int hashCode()
hashCode
in class org.apache.lucene.search.Query
public String toString(String field)
toString
in class org.apache.lucene.search.Query
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
rewrite
in class org.apache.lucene.search.Query
IOException
public org.apache.lucene.search.Query clone()
clone
in class org.apache.lucene.search.Query
public void extractTerms(Set<org.apache.lucene.index.Term> terms)
extractTerms
in class org.apache.lucene.search.Query
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher) throws IOException
createWeight
in class org.apache.lucene.search.Query
IOException
Copyright © 2009–2015. All rights reserved.