private static boolean needWeakAnd(Item topLevelItem, int n) {
        return !(topLevelItem instanceof WeakAndItem topLevelWeakAnd) ||
                ((n != 0 || topLevelWeakAnd.nIsExplicit()) && (n != topLevelWeakAnd.getN()));

    }
Returns whether the item is a specific word item
container-search/src/main/java/com/yahoo/prelude/query/parser/AdvancedParser.java