private boolean is(Token.Kind kind, Token tokenOrNull) {
        if (tokenOrNull == null) return false;
        return kind.equals(tokenOrNull.kind);
    }
Assigns the default index to query terms having no default index.

This will apply the default index to terms without it added through the filter parameter,
where setting defaultIndex into state causes incorrect parsing.

@param defaultIndex the default index to assign
@param item         the item to check
container-search/src/main/java/com/yahoo/prelude/query/parser/AbstractParser.java