@@ -70,7 +70,7 @@ public static class Builder {
70
70
71
71
private final RootObjectMapper rootObjectMapper ;
72
72
73
- private ImmutableMap <String , Object > attributes = ImmutableMap .of ();
73
+ private ImmutableMap <String , Object > meta = ImmutableMap .of ();
74
74
75
75
private XContentMapper .BuilderContext builderContext = new XContentMapper .BuilderContext (new ContentPath (1 ));
76
76
@@ -79,8 +79,8 @@ public Builder(String index, RootObjectMapper.Builder builder) {
79
79
this .rootObjectMapper = builder .build (builderContext );
80
80
}
81
81
82
- public Builder attributes (ImmutableMap <String , Object > attributes ) {
83
- this .attributes = attributes ;
82
+ public Builder meta (ImmutableMap <String , Object > meta ) {
83
+ this .meta = meta ;
84
84
return this ;
85
85
}
86
86
@@ -149,7 +149,7 @@ public boolean hasSearchAnalyzer() {
149
149
150
150
public XContentDocumentMapper build (XContentDocumentMapperParser docMapperParser ) {
151
151
Preconditions .checkNotNull (rootObjectMapper , "Mapper builder must have the root object mapper set" );
152
- return new XContentDocumentMapper (index , docMapperParser , rootObjectMapper , attributes , uidFieldMapper , idFieldMapper , typeFieldMapper , indexFieldMapper ,
152
+ return new XContentDocumentMapper (index , docMapperParser , rootObjectMapper , meta , uidFieldMapper , idFieldMapper , typeFieldMapper , indexFieldMapper ,
153
153
sourceFieldMapper , routingFieldMapper , allFieldMapper , analyzerMapper , indexAnalyzer , searchAnalyzer , boostFieldMapper );
154
154
}
155
155
}
@@ -167,7 +167,7 @@ public XContentDocumentMapper build(XContentDocumentMapperParser docMapperParser
167
167
168
168
private final XContentDocumentMapperParser docMapperParser ;
169
169
170
- private volatile ImmutableMap <String , Object > attributes ;
170
+ private volatile ImmutableMap <String , Object > meta ;
171
171
172
172
private volatile CompressedString mappingSource ;
173
173
@@ -205,7 +205,7 @@ public XContentDocumentMapper build(XContentDocumentMapperParser docMapperParser
205
205
206
206
public XContentDocumentMapper (String index , XContentDocumentMapperParser docMapperParser ,
207
207
RootObjectMapper rootObjectMapper ,
208
- ImmutableMap <String , Object > attributes ,
208
+ ImmutableMap <String , Object > meta ,
209
209
UidFieldMapper uidFieldMapper ,
210
210
IdFieldMapper idFieldMapper ,
211
211
TypeFieldMapper typeFieldMapper ,
@@ -219,7 +219,7 @@ public XContentDocumentMapper(String index, XContentDocumentMapperParser docMapp
219
219
this .index = index ;
220
220
this .type = rootObjectMapper .name ();
221
221
this .docMapperParser = docMapperParser ;
222
- this .attributes = attributes ;
222
+ this .meta = meta ;
223
223
this .rootObjectMapper = rootObjectMapper ;
224
224
this .uidFieldMapper = uidFieldMapper ;
225
225
this .idFieldMapper = idFieldMapper ;
@@ -272,8 +272,8 @@ public XContentDocumentMapper(String index, XContentDocumentMapperParser docMapp
272
272
return this .type ;
273
273
}
274
274
275
- @ Override public ImmutableMap <String , Object > attributes () {
276
- return this .attributes ;
275
+ @ Override public ImmutableMap <String , Object > meta () {
276
+ return this .meta ;
277
277
}
278
278
279
279
@ Override public CompressedString mappingSource () {
@@ -448,7 +448,7 @@ void addFieldMapper(FieldMapper fieldMapper) {
448
448
rootObjectMapper .merge (xContentMergeWith .rootObjectMapper , mergeContext );
449
449
if (!mergeFlags .simulate ()) {
450
450
// let the merge with attributes to override the attributes
451
- attributes = mergeWith .attributes ();
451
+ meta = mergeWith .meta ();
452
452
// update the source of the merged one
453
453
refreshSource ();
454
454
}
@@ -488,8 +488,8 @@ void addFieldMapper(FieldMapper fieldMapper) {
488
488
}
489
489
}
490
490
491
- if (attributes != null && !attributes .isEmpty ()) {
492
- builder .field ("_attributes " , attributes ());
491
+ if (meta != null && !meta .isEmpty ()) {
492
+ builder .field ("_meta " , meta ());
493
493
}
494
494
}
495
495
// no need to pass here id and boost, since they are added to the root object mapper
0 commit comments