private CompositeItem createType(TermType termType) {
        if (termType == TermType.DEFAULT) {
            if (query.getModel().getType() == Query.Type.ANY)
                return new OrItem();
            else if (query.getModel().getType() == Query.Type.WEAKAND)
                return new WeakAndItem();
            else
                return new AndItem();
        }
        else {
            return (CompositeItem)termType.createItemClass();
        }
    }
A special purpose check used to simplify the above
container-search/src/main/java/com/yahoo/prelude/semantics/engine/Evaluation.java