private Index getIndexByCanonicNameFromDocumentTypes(String canonicName, List<String> documentTypes) {
        if (documentTypes.isEmpty()) {
            Index index = unionSearchDefinition.getIndex(canonicName);
            return (index != null) ? index : Index.nullIndex;
        }

        DocumentTypeListOffset sd = chooseSearchDefinition(documentTypes, 0);

        while (sd != null) {
            Index index = sd.searchDefinition.getIndex(canonicName);

            if (index != null) return index;
            sd = chooseSearchDefinition(documentTypes, sd.offset);
        }
        return Index.nullIndex;
    }
Whether this has (any) NGram indexes. Calculated at freeze time.
container-search/src/main/java/com/yahoo/prelude/IndexFacts.java