@Override
    public BucketSet getBucketSet(BucketIdFactory factory) {
        Deque<BucketItem> buf = new ArrayDeque<>();
        for (NodeItem item : items) {
            if (!buf.isEmpty()) {
                while (buf.peek().operator > item.operator) {
                    combineBuckets(buf);
                }
            }
            buf.push(new BucketItem(item.operator, item.node.getBucketSet(factory)));
        }
        while (buf.size() > 1) {
            combineBuckets(buf);
        }
        return buf.pop().buckets;
    }
Adds an (operator, node) pair to this expression.

@param operator The operator that combines the previous with the node given.
@param node The node to add to this.
@return This, to allow chaining.
document/src/main/java/com/yahoo/document/select/rule/LogicNode.java