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 |
datatype
ancestor, 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, wrapToStringWithDatatype
getDocsNodesAndPositionsEnum, getLevelConstraint, getNodeConstraint, setAncestorPointer, setLevelConstraint, setNodeConstraint, setNodeConstraint
public 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.Query
IOException
public void extractTerms(Set<org.apache.lucene.index.Term> terms)
extractTerms
in class org.apache.lucene.search.Query
public 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.Query
public boolean equals(Object o)
o
is equal to this.equals
in class org.apache.lucene.search.Query
public int hashCode()
hashCode
in class org.apache.lucene.search.Query
Copyright © 2014. All rights reserved.