Stay organized with collections
Save and categorize content based on your preferences.
public final class Schema
Contains information about the kinds of document Fields
which are supported by the Index.
// Get the searchService for the default namespace
SearchService searchService = SearchServiceFactory.getSearchService();
// Get the first page of indexes available and retrieve schemas
GetResponse<Index> response = searchService.getIndexes(
GetIndexesRequest.newBuilder().setSchemaFetched(true).build());
// List out elements of Schema
for (Index index : response) {
Schema schema = index.getSchema();
for (String fieldName : schema.getFieldNames()) {
List<FieldType> typesForField = schema.getFieldTypes(fieldName);
}
}