use of datawave.query.planner.SeekingQueryPlanner in project datawave by NationalSecurityAgency.
the class LookupUUIDTune method configure.
@Override
public void configure(BaseQueryLogic<Entry<Key, Value>> logic) {
if (logic instanceof ShardQueryLogic) {
ShardQueryLogic rsq = ShardQueryLogic.class.cast(logic);
rsq.setBypassAccumulo(bypassAccumulo);
rsq.setSpeculativeScanning(speculativeScanning);
rsq.setCacheModel(enableCaching);
rsq.setPrimaryToSecondaryFieldMap(primaryToSecondaryFieldMap);
rsq.setEnforceUniqueTermsWithinExpressions(enforceUniqueTermsWithinExpressions);
if (querySyntaxParsers != null) {
rsq.setQuerySyntaxParsers(querySyntaxParsers);
}
if (reduceResponse) {
rsq.setParseTldUids(true);
// setup SeekingQueryPlanner in case the queryIterator requires it
SeekingQueryPlanner planner = new SeekingQueryPlanner();
planner.setMaxFieldHitsBeforeSeek(maxFieldHitsBeforeSeek);
planner.setMaxKeysBeforeSeek(maxKeysBeforeSeek);
rsq.setQueryPlanner(planner);
if (maxPageSize != -1) {
rsq.setMaxPageSize(maxPageSize);
}
if (pageByteTrigger != -1) {
rsq.setPageByteTrigger(pageByteTrigger);
}
}
}
}
Aggregations