public class NodeConstantScoreQuery extends NodePrimitiveQuery
Code taken from ConstantScoreQuery and adapted for the siren use
case.
| Modifier and Type | Class and Description |
|---|---|
protected class |
NodeConstantScoreQuery.NodeConstantScorer |
protected class |
NodeConstantScoreQuery.NodeConstantWeight |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.lucene.search.Filter |
filter |
protected NodeQuery |
query |
datatypeancestor, levelConstraint, lowerBound, upperBound| Constructor and Description |
|---|
NodeConstantScoreQuery(NodeQuery query)
Strips off scores from the passed in Query.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.IndexSearcher searcher) |
boolean |
equals(Object o) |
void |
extractTerms(Set<org.apache.lucene.index.Term> terms) |
NodeQuery |
getQuery()
Returns the encapsulated query, returns
null if a filter is wrapped. |
int |
hashCode() |
NodeQuery |
rewrite(org.apache.lucene.index.IndexReader reader) |
protected void |
setAncestorPointer(NodeQuery ancestor)
Expert: Add a pointer to the node query ancestor
|
void |
setLevelConstraint(int levelConstraint)
Set a constraint on the node's level
|
void |
setNodeConstraint(int lowerBound,
int upperBound)
Set an index interval constraint for a node.
|
String |
toString(String field) |
setDatatype, wrapToStringWithDatatypegetDocsNodesAndPositionsEnum, getLevelConstraint, getNodeConstraint, setNodeConstraintprotected final org.apache.lucene.search.Filter filter
protected final NodeQuery query
public NodeConstantScoreQuery(NodeQuery query)
public NodeQuery getQuery()
null if a filter is wrapped.protected void setAncestorPointer(NodeQuery ancestor)
NodeQueryThe pointer to node query ancestor is used to retrieve node constraints from ancestors.
setAncestorPointer in class NodeQuerypublic void setNodeConstraint(int lowerBound,
int upperBound)
NodeQuerysetNodeConstraint in class NodeQuerypublic void setLevelConstraint(int levelConstraint)
NodeQuery
Given that the root of the tree (level 0) is the document id, the node
level constraint ranges from 1 to Integer.MAX_VALUE. A node
level constraint of 0 will always return false.
setLevelConstraint in class NodeQuerypublic NodeQuery rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
rewrite in class org.apache.lucene.search.QueryIOExceptionpublic void extractTerms(Set<org.apache.lucene.index.Term> terms)
extractTerms in class org.apache.lucene.search.Querypublic org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher)
throws IOException
createWeight in class org.apache.lucene.search.QueryIOExceptionpublic String toString(String field)
toString in class org.apache.lucene.search.Querypublic boolean equals(Object o)
equals in class org.apache.lucene.search.Querypublic int hashCode()
hashCode in class org.apache.lucene.search.QueryCopyright © 2014. All rights reserved.