Skip to content

Commit 1e0f03b

Browse files
committed
Remove DocValuesFormatService and PostingsFormatService
Related to elastic#9741 Closes elastic#103.
1 parent ec0de9c commit 1e0f03b

File tree

2 files changed

+14
-27
lines changed

2 files changed

+14
-27
lines changed

src/main/java/org/elasticsearch/index/mapper/attachment/AttachmentMapper.java

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@
1919

2020
package org.elasticsearch.index.mapper.attachment;
2121

22-
import static org.elasticsearch.index.mapper.MapperBuilders.dateField;
23-
import static org.elasticsearch.index.mapper.MapperBuilders.integerField;
24-
import static org.elasticsearch.index.mapper.MapperBuilders.stringField;
25-
import static org.elasticsearch.index.mapper.core.TypeParsers.parseMultiField;
26-
import static org.elasticsearch.index.mapper.core.TypeParsers.parsePathType;
27-
import static org.elasticsearch.plugin.mapper.attachments.tika.TikaInstance.tika;
28-
29-
import java.io.IOException;
30-
import java.util.Iterator;
31-
import java.util.List;
32-
import java.util.Map;
33-
3422
import org.apache.lucene.document.Field;
3523
import org.apache.lucene.document.FieldType;
3624
import org.apache.tika.language.LanguageIdentifier;
@@ -42,17 +30,19 @@
4230
import org.elasticsearch.common.xcontent.XContentBuilder;
4331
import org.elasticsearch.common.xcontent.XContentParser;
4432
import org.elasticsearch.index.fielddata.FieldDataType;
45-
import org.elasticsearch.index.mapper.ContentPath;
46-
import org.elasticsearch.index.mapper.DocumentMapperParser;
47-
import org.elasticsearch.index.mapper.FieldMapperListener;
48-
import org.elasticsearch.index.mapper.Mapper;
49-
import org.elasticsearch.index.mapper.MapperParsingException;
50-
import org.elasticsearch.index.mapper.MergeContext;
51-
import org.elasticsearch.index.mapper.MergeMappingException;
52-
import org.elasticsearch.index.mapper.ObjectMapperListener;
53-
import org.elasticsearch.index.mapper.ParseContext;
33+
import org.elasticsearch.index.mapper.*;
5434
import org.elasticsearch.index.mapper.core.AbstractFieldMapper;
5535

36+
import java.io.IOException;
37+
import java.util.Iterator;
38+
import java.util.List;
39+
import java.util.Map;
40+
41+
import static org.elasticsearch.index.mapper.MapperBuilders.*;
42+
import static org.elasticsearch.index.mapper.core.TypeParsers.parseMultiField;
43+
import static org.elasticsearch.index.mapper.core.TypeParsers.parsePathType;
44+
import static org.elasticsearch.plugin.mapper.attachments.tika.TikaInstance.tika;
45+
5646
/**
5747
* <pre>
5848
* "field1" : "..."
@@ -365,7 +355,7 @@ public AttachmentMapper(Names names, ContentPath.Type pathType, int defaultIndex
365355
Mapper dateMapper, Mapper titleMapper, Mapper nameMapper, Mapper authorMapper,
366356
Mapper keywordsMapper, Mapper contentTypeMapper, Mapper contentLengthMapper,
367357
Mapper languageMapper, MultiFields multiFields, CopyTo copyTo) {
368-
super(names, 1.0f, AbstractFieldMapper.Defaults.FIELD_TYPE, false, null, null, null, null, null, null, null,
358+
super(names, 1.0f, AbstractFieldMapper.Defaults.FIELD_TYPE, false, null, null, null, null, null,
369359
ImmutableSettings.EMPTY, multiFields, copyTo);
370360
this.pathType = pathType;
371361
this.defaultIndexedChars = defaultIndexedChars;

src/test/java/org/elasticsearch/index/mapper/xcontent/MapperTestUtils.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
import org.elasticsearch.index.IndexNameModule;
3333
import org.elasticsearch.index.analysis.AnalysisModule;
3434
import org.elasticsearch.index.analysis.AnalysisService;
35-
import org.elasticsearch.index.codec.docvaluesformat.DocValuesFormatService;
36-
import org.elasticsearch.index.codec.postingsformat.PostingsFormatService;
3735
import org.elasticsearch.index.fielddata.IndexFieldDataService;
3836
import org.elasticsearch.index.mapper.DocumentMapperParser;
3937
import org.elasticsearch.index.mapper.MapperService;
@@ -58,8 +56,7 @@ public static MapperService newMapperService(Index index, Settings indexSettings
5856
NoneCircuitBreakerService circuitBreakerService = new NoneCircuitBreakerService();
5957
return new MapperService(index, indexSettings, new Environment(), newAnalysisService(), new IndexFieldDataService(index, ImmutableSettings.Builder.EMPTY_SETTINGS,
6058
new IndicesFieldDataCache(ImmutableSettings.Builder.EMPTY_SETTINGS, new IndicesFieldDataCacheListener(circuitBreakerService), testingThreadPool),
61-
circuitBreakerService),
62-
new PostingsFormatService(index), new DocValuesFormatService(index), newSimilarityLookupService(), null);
59+
circuitBreakerService), newSimilarityLookupService(), null);
6360
}
6461

6562
public static AnalysisService newAnalysisService() {
@@ -92,6 +89,6 @@ public static DocumentMapperParser newMapperParser(Settings settings) {
9289
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
9390
.put(settings)
9491
.build();
95-
return new DocumentMapperParser(new Index("test"), forcedSettings, MapperTestUtils.newAnalysisService(forcedSettings), null, null, null, null);
92+
return new DocumentMapperParser(new Index("test"), forcedSettings, MapperTestUtils.newAnalysisService(forcedSettings), null, null);
9693
}
9794
}

0 commit comments

Comments
 (0)