@@ -0,0 +1,926 @@
+package uk.ac.ebi.quickgo.annotation.service.search;%0A%0Aimport uk.ac.ebi.quickgo.annotation.common.document.AnnotationFields;%0Aimport uk.ac.ebi.quickgo.common.SearchableDocumentFields;%0Aimport uk.ac.ebi.quickgo.rest.search.SearchableField;%0A%0Aimport java.util.stream.Stream;%0Aimport org.springframework.stereotype.Component;%0A%0A/**%0A * Checks if a given field is searchable searchable.%0A *%0A * @author Ricardo Antunes%0A */%0A@Component%0Apublic class AnnotationSearchableField implements SearchableField, SearchableDocumentFields %7B%0A    @Override public boolean isDocumentSearchable(String field) %7B%0A        return AnnotationFields.Searchable.isSearchable(field);%0A    %7D%0A%0A    @Override public Stream%3CString%3E searchableDocumentFields() %7B%0A        return AnnotationFields.Searchable.searchableFields().stream();%0A    %7D%0A%0A    @Override public boolean isSearchable(String field) %7B%0A        return AnnotationFields.Searchable.isSearchable(field);%0A    %7D%0A%7D%0A

Create a class that is responsible for indicating when a field is searchable or not.