private String getCanonicNameFromDocumentTypes(String indexName, List<String> documentTypes) {
        if (documentTypes.isEmpty()) {
            Index index = unionSearchDefinition.getIndex(indexName);
            if (index == null) {
                index = unionSearchDefinition.getIndexByLowerCase(toLowerCase(indexName));
            }
            return index == null ? indexName : index.getName();
        }
        Set<String> gotNames = new TreeSet<>();
        for (String dt : documentTypes) {
            var sd = searchDefinitions.get(dt);
            if (sd != null) {
                Index index = sd.getIndex(indexName);
                if (index == null) {
                    index = sd.getIndexByLowerCase(toLowerCase(indexName));
                }
                if (index != null) {
                    gotNames.add(index.getName());
                }
            }
        }
        if (gotNames.size() == 1) {
            return gotNames.iterator().next();
        }
        return indexName;
    }
Whether this has (any) NGram indexes. Calculated at freeze time.
container-search/src/main/java/com/yahoo/prelude/IndexFacts.java