public class NodeTermQuery extends NodePrimitiveQuery
NodePrimitiveQuery that matches nodes containing a term.
Provides an interface to iterate over the candidate documents and nodes
containing the term. This may be combined with other terms with a
NodeBooleanQuery.
| Modifier and Type | Class and Description |
|---|---|
protected class |
NodeTermQuery.NodeTermWeight |
datatypeancestor, levelConstraint, lowerBound, upperBound| Constructor and Description |
|---|
NodeTermQuery(org.apache.lucene.index.Term t)
Constructs a query for the term
t. |
NodeTermQuery(org.apache.lucene.index.Term t,
int docFreq)
Expert: constructs a TermQuery that will use the
provided docFreq instead of looking up the docFreq
against the searcher.
|
NodeTermQuery(org.apache.lucene.index.Term t,
org.apache.lucene.index.TermContext states)
Expert: constructs a TermQuery that will use the
provided docFreq instead of looking up the docFreq
against the searcher.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.IndexSearcher searcher) |
boolean |
equals(Object o)
Returns true iff
o is equal to this. |
void |
extractTerms(Set<org.apache.lucene.index.Term> terms) |
org.apache.lucene.index.Term |
getTerm()
Returns the term of this query.
|
int |
hashCode()
Returns a hash code value for this object.
|
String |
toString(String field)
Prints a user-readable version of this query.
|
setDatatype, wrapToStringWithDatatypegetDocsNodesAndPositionsEnum, getLevelConstraint, getNodeConstraint, setAncestorPointer, setLevelConstraint, setNodeConstraint, setNodeConstraintpublic NodeTermQuery(org.apache.lucene.index.Term t)
t.public NodeTermQuery(org.apache.lucene.index.Term t,
int docFreq)
public NodeTermQuery(org.apache.lucene.index.Term t,
org.apache.lucene.index.TermContext states)
public org.apache.lucene.index.Term getTerm()
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher)
throws IOException
createWeight in class org.apache.lucene.search.QueryIOExceptionpublic void extractTerms(Set<org.apache.lucene.index.Term> terms)
extractTerms in class org.apache.lucene.search.Querypublic String toString(String field)
The term is wrapped in simple quotes, so that any special characters it may contains are disabled. See ProtectedQueryNode in siren-qparser.
toString in class org.apache.lucene.search.Querypublic boolean equals(Object o)
o is equal to this.equals in class org.apache.lucene.search.Querypublic int hashCode()
hashCode in class org.apache.lucene.search.QueryCopyright © 2014. All rights reserved.