public class HasValueQuery
extends org.apache.lucene.search.Query
Query implementation that is satisfied if there is at least one value for a document.| Modifier and Type | Class and Description |
|---|---|
protected class |
HasValueQuery.ExistsScorer
A scorer for the Path query.
|
protected class |
HasValueQuery.ExistsWeight
Calculates query weights and builds query scores for our NOT queries.
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
fieldName |
protected org.apache.lucene.document.FieldSelector |
fieldSelector |
| Constructor and Description |
|---|
HasValueQuery(String fieldName)
Construct a
Query implementation that scores nodes according to the supplied comparator. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.Searcher searcher) |
protected boolean |
hasValue(org.apache.lucene.index.IndexReader reader,
int docId) |
String |
toString(String field) |
protected final String fieldName
protected final org.apache.lucene.document.FieldSelector fieldSelector
public HasValueQuery(String fieldName)
Query implementation that scores nodes according to the supplied comparator.fieldName - the name of the document field containing the value; may not be nullpublic Object clone()
clone in class org.apache.lucene.search.QueryQuery.clone()public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
createWeight in class org.apache.lucene.search.QueryQuery.createWeight(org.apache.lucene.search.Searcher)public String toString(String field)
toString in class org.apache.lucene.search.QueryQuery.toString(java.lang.String)protected boolean hasValue(org.apache.lucene.index.IndexReader reader,
int docId)
throws IOException
IOExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.