protected Pair<Item, Boolean> indexableItem(String indexPath) {
        int position = tokens.getPosition();
        Item item = null;

        try {
            boolean explicitIndex = false;
            String indexName = indexPrefix(indexPath);
            if (indexName != null)
                explicitIndex = true;
            else
                indexName = this.defaultIndex;
            setSubmodeFromIndex(indexName == null ? null : indexPath + indexName, indexFacts);

            item = number();
            if (item == null)
                item = phrase(indexName == null ? null : indexPath + indexName);
            if (item == null && explicitIndex && tokens.skip(LCURLYBRACKET))
                item = sameElement(indexPath + indexName);
            if (item == null && explicitIndex && wordsAhead())
                item = phrase(indexName);

            submodes.reset();

            int weight = -1;

            if (item != null) {
                weight = weightSuffix();
            }
            if (indexName != null && item != null) {
                item.setIndexName(indexName);
            }

            if (weight != -1 && item != null) {
                item.setWeight(weight);
            }

            return new Pair<>(item, explicitIndex);
        } finally {
            if (item == null) {
                tokens.setPosition(position);
            }
        }
    }
Returns an item and whether it had an explicit index ('indexname:' prefix).

@param indexPath the index name prefix this is in the context of, only non-empty if this is
                 inside a sameElement. The path includes the index name and the trailing dot.
@return an item and whether it has an explicit index, or a Pair with the first element null if none
container-search/src/main/java/com/yahoo/prelude/query/parser/StructuredParser.java