use of com.yahoo.searchlib.expression.NullResultNode in project vespa by vespa-engine.
the class Grouping method unifyNull.
public void unifyNull() {
class FindGroup implements ObjectPredicate {
@Override
public boolean check(Object obj) {
return obj instanceof Group;
}
}
class UnifyNullGroupId implements ObjectOperation {
@Override
public void execute(Object obj) {
Group group = (Group) obj;
ResultNode id = group.getId();
if (id instanceof BucketResultNode && ((BucketResultNode) id).empty()) {
group.setId(new NullResultNode());
}
}
}
selectMembers(new FindGroup(), new UnifyNullGroupId());
}
Aggregations