/** * Returns all the fields that match a given pattern. If prefixed with a * type then the fields will be returned with a type prefix. */ public Collection<String> simpleMatchToIndexNames(String pattern) { return mapperService.simpleMatchToFullName(pattern); }
private static void handleFieldWildcards(IndexShard indexShard, TermVectorsRequest request) { Set<String> fieldNames = new HashSet<>(); for (String pattern : request.selectedFields()) { fieldNames.addAll(indexShard.mapperService().simpleMatchToFullName(pattern)); } request.selectedFields(fieldNames.toArray(Strings.EMPTY_ARRAY)); }
Set<String> fieldNames = new HashSet<>(); for (String field : request.fields()) { fieldNames.addAll(mapperService.simpleMatchToFullName(field));
/** * Returns all the fields that match a given pattern. If prefixed with a * type then the fields will be returned with a type prefix. */ public Collection<String> simpleMatchToIndexNames(String pattern) { return mapperService.simpleMatchToFullName(pattern); }
/** * Returns all the fields that match a given pattern. If prefixed with a * type then the fields will be returned with a type prefix. */ public Collection<String> simpleMatchToIndexNames(String pattern) { return mapperService.simpleMatchToFullName(pattern); }
Collection<String> fieldNamesToHighlight; if (Regex.isSimpleMatchPattern(field.field())) { fieldNamesToHighlight = context.mapperService().simpleMatchToFullName(field.field()); } else { fieldNamesToHighlight = Collections.singletonList(field.field());
Collection<String> fieldNames = context.mapperService().simpleMatchToFullName(fieldNameOrPattern); for (String fieldName : fieldNames) { MappedFieldType fieldType = context.smartNameFieldType(fieldName);
private static void handleFieldWildcards(IndexShard indexShard, TermVectorsRequest request) { Set<String> fieldNames = new HashSet<>(); for (String pattern : request.selectedFields()) { fieldNames.addAll(indexShard.mapperService().simpleMatchToFullName(pattern)); } request.selectedFields(fieldNames.toArray(Strings.EMPTY_ARRAY)); }
private static void handleFieldWildcards(IndexShard indexShard, TermVectorsRequest request) { Set<String> fieldNames = new HashSet<>(); for (String pattern : request.selectedFields()) { fieldNames.addAll(indexShard.mapperService().simpleMatchToFullName(pattern)); } request.selectedFields(fieldNames.toArray(Strings.EMPTY_ARRAY)); }
List<DocValueFieldsContext.FieldAndFormat> docValueFields = new ArrayList<>(); for (DocValueFieldsContext.FieldAndFormat format : source.docValueFields()) { Collection<String> fieldNames = context.mapperService().simpleMatchToFullName(format.field); for (String fieldName: fieldNames) { docValueFields.add(new DocValueFieldsContext.FieldAndFormat(fieldName, format.format));
@Override protected FieldCapabilitiesIndexResponse shardOperation(final FieldCapabilitiesIndexRequest request, ShardId shardId) { MapperService mapperService = indicesService.indexServiceSafe(shardId.getIndex()).mapperService(); Set<String> fieldNames = new HashSet<>(); for (String field : request.fields()) { fieldNames.addAll(mapperService.simpleMatchToFullName(field)); } Predicate<String> fieldPredicate = indicesService.getFieldFilter().apply(shardId.getIndexName()); Map<String, FieldCapabilities> responseMap = new HashMap<>(); for (String field : fieldNames) { MappedFieldType ft = mapperService.fullName(field); if (ft != null) { if (indicesService.isMetaDataField(field) || fieldPredicate.test(ft.name())) { FieldCapabilities fieldCap = new FieldCapabilities(field, ft.typeName(), ft.isSearchable(), ft.isAggregatable()); responseMap.put(field, fieldCap); } } } return new FieldCapabilitiesIndexResponse(shardId.getIndexName(), responseMap); }
Set<String> fieldNames = new HashSet<>(); for (String field : request.fields()) { fieldNames.addAll(mapperService.simpleMatchToFullName(field));
Collection<String> fieldNamesToHighlight; if (Regex.isSimpleMatchPattern(field.field())) { fieldNamesToHighlight = context.mapperService().simpleMatchToFullName(field.field()); } else { fieldNamesToHighlight = Collections.singletonList(field.field());
Collection<String> fieldNamesToHighlight; if (Regex.isSimpleMatchPattern(field.field())) { fieldNamesToHighlight = context.mapperService().simpleMatchToFullName(field.field()); } else { fieldNamesToHighlight = Collections.singletonList(field.field());
Collection<String> fieldNames = context.mapperService().simpleMatchToFullName(fieldNameOrPattern); for (String fieldName : fieldNames) { MappedFieldType fieldType = context.smartNameFieldType(fieldName);
Collection<String> fieldNames = context.mapperService().simpleMatchToFullName(fieldNameOrPattern); for (String fieldName : fieldNames) { MappedFieldType fieldType = context.smartNameFieldType(fieldName);
List<DocValueFieldsContext.FieldAndFormat> docValueFields = new ArrayList<>(); for (DocValueFieldsContext.FieldAndFormat format : source.docValueFields()) { Collection<String> fieldNames = context.mapperService().simpleMatchToFullName(format.field); for (String fieldName: fieldNames) { docValueFields.add(new DocValueFieldsContext.FieldAndFormat(fieldName, format.format));