private boolean fieldIsIndexed(final FieldMapping field) {
        try {
            final Map<String, Property> fieldMap = field.mapping();
            final Optional<Property> firstFieldMapping = fieldMap.values().stream().findFirst();
            if (firstFieldMapping.isPresent()) {
                final Object mappingInstance = firstFieldMapping.get()._get();

                // Detect non-indexed fields for common data types. For all others, assume the field is indexed
                if (mappingInstance instanceof KeywordProperty) {
                    return !Boolean.FALSE.equals(((KeywordProperty) mappingInstance).index());
                } else if (mappingInstance instanceof TextProperty) {
                    return !Boolean.FALSE.equals(((TextProperty) mappingInstance).index());
                } else if (mappingInstance instanceof BooleanProperty) {
                    return !Boolean.FALSE.equals(((BooleanProperty) mappingInstance).index());
                } else if (mappingInstance instanceof DateProperty) {
                    return !Boolean.FALSE.equals(((DateProperty) mappingInstance).index());
                } else if (mappingInstance instanceof NumberPropertyBase) {
                    return !Boolean.FALSE.equals(((NumberPropertyBase) mappingInstance).index());
                } else if (mappingInstance instanceof IpProperty) {
                    return !Boolean.FALSE.equals(((IpProperty) mappingInstance).index());
                } else {
                    return true;
                }
            }
        } catch (Exception e) {
            return false;
        }

        return false;
    }
Tests whether a field has the mapping property `index` set to `true`.
This determines whether it is searchable.
stroom-search/stroom-search-elastic/src/main/java/stroom/search/elastic/search/ElasticSearchProvider.java