private boolean needNewORTopLevel(Item topLevelItem, Item item) {
        if (item == null) return false;
        if (topLevelItem instanceof TermItem) return true;
        if (topLevelItem instanceof PhraseItem) return true;
        if (topLevelItem instanceof BlockItem) return true;
        if ( topLevelItem instanceof AndItem) return true;
        return false;
    }
Says whether we need a new top level OR item given the new item
container-search/src/main/java/com/yahoo/prelude/query/parser/SimpleParser.java