public abstract class QueryConstraint extends SelectorBasedConstraint
QueryConstraint implements a constraint that is based on a
 lucene query.| Constructor and Description | 
|---|
QueryConstraint(org.apache.lucene.search.Query constraint,
               SelectorImpl selector,
               LuceneQueryFactory factory)
Creates a new query constraint using the given lucene query. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
evaluate(ScoreNode[] row,
        Name[] selectorNames,
        EvaluationContext context)
Evaluates this constraint for the given row. 
 | 
getSelector, getSelectorIndexpublic QueryConstraint(org.apache.lucene.search.Query constraint,
               SelectorImpl selector,
               LuceneQueryFactory factory)
constraint - the lucene query constraint.selector - the selector for this constraint.factory - the lucene query factory.public boolean evaluate(ScoreNode[] row, Name[] selectorNames, EvaluationContext context) throws IOException
row - the current row of score nodes.selectorNames - the selector names associated with row.context - the evaluation context.true if the row satisfies the constraint,
         false otherwise.IOException - if an error occurs while evaluating the constraint.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.