use of datawave.query.iterator.builder.IndexRegexIteratorBuilder in project datawave by NationalSecurityAgency.
the class IteratorBuildingVisitor method ivarateRegex.
/**
* Build the iterator stack using the regex ivarator (field index caching regex iterator)
*
* @param rootNode
* the node that was processed to generated this builder
* @param sourceNode
* the source node derived from the root
* @param data
*/
public void ivarateRegex(JexlNode rootNode, JexlNode sourceNode, Object data) throws IOException {
IndexRegexIteratorBuilder builder = new IndexRegexIteratorBuilder();
if (sourceNode instanceof ASTERNode || sourceNode instanceof ASTNRNode) {
builder.setNegated(sourceNode instanceof ASTNRNode);
builder.setField(JexlASTHelper.getIdentifier(sourceNode));
builder.setValue(String.valueOf(JexlASTHelper.getLiteralValue(sourceNode)));
} else {
QueryException qe = new QueryException(DatawaveErrorCode.UNEXPECTED_SOURCE_NODE, MessageFormat.format("{0}", "ExceededValueThresholdMarkerJexlNode"));
throw new DatawaveFatalQueryException(qe);
}
builder.negateAsNeeded(data);
builder.forceDocumentBuild(!limitLookup && this.isQueryFullySatisfied);
ivarate(builder, rootNode, sourceNode, data);
}
Aggregations