private boolean isIndexFromDocumentTypes(String indexName, List<String> documentTypes) {
        if ( notInitialized()) return true;

        if (documentTypes.isEmpty()) {
            return unionSearchDefinition.getIndex(indexName) != null;
        }

        DocumentTypeListOffset sd = chooseSearchDefinition(documentTypes, 0);
        while (sd != null) {
            Index index = sd.searchDefinition.getIndex(indexName);
            if (index != null) {
                return true;
            }
            sd = chooseSearchDefinition(documentTypes, sd.offset);
        }

        return false;
    }
Whether this has (any) NGram indexes. Calculated at freeze time.
container-search/src/main/java/com/yahoo/prelude/IndexFacts.java