public void setFromIndex(String indexName, IndexFacts.Session session) {
            if (indexName == null) return;

            reset();
            Index current = session.getIndex(indexName);

            if (current.isUriIndex())
                url = true;
            else if (current.isHostIndex())
                site = true;
        }
Sets submodes from an index.

@param indexName the index name which should decide the submodes, or null to do nothing.
@param session the session used to look up information about this index
container-search/src/main/java/com/yahoo/prelude/query/parser/AbstractParser.java