protected boolean shouldParenthesize() {
        return getParent()!= null && ! (getParent() instanceof QueryTree);
    }
Composite items should be parenthized when not on the top level
container-search/src/main/java/com/yahoo/prelude/query/CompositeItem.java