Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public GeoShapeWithDocValuesFieldMapper build(BuilderContext context) {

@Override
public boolean defaultDocValues(Version indexCreated) {
return Version.V_8_0_0.onOrBefore(indexCreated);
return Version.V_7_8_0.onOrBefore(indexCreated);
}

protected Explicit<Boolean> docValues() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ public void testDefaultConfiguration() throws IOException {
assertTrue(geoShapeFieldMapper.fieldType().hasDocValues());
}

public void testDefaultDocValueConfigurationOnPre8() throws IOException {
public void testDefaultDocValueConfigurationOnPre7_8() throws IOException {
String mapping = Strings.toString(XContentFactory.jsonBuilder().startObject().startObject("type1")
.startObject("properties").startObject("location")
.field("type", "geo_shape")
.endObject().endObject()
.endObject().endObject());

Version oldVersion = VersionUtils.randomPreviousCompatibleVersion(random(), Version.V_8_0_0);
Version oldVersion = VersionUtils.randomVersionBetween(random(), Version.V_7_0_0, Version.V_7_8_0);
DocumentMapper defaultMapper = createIndex("test", settings(oldVersion).build()).mapperService().documentMapperParser()
.parse("type1", new CompressedXContent(mapping));
Mapper fieldMapper = defaultMapper.mappers().getMapper("location");
Expand Down