Skip to content

Commit ea2c781

Browse files
committed
Fix #1429: Add missing doc_values to date, bool, and geo point mappings
1 parent 87640aa commit ea2c781

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

src/Nest/Domain/Mapping/Descriptors/BooleanMappingDescriptor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,11 @@ public BooleanMappingDescriptor<T> Fields(Func<CorePropertiesDescriptor<T>, Core
8484
}
8585
return this;
8686
}
87+
88+
public BooleanMappingDescriptor<T> DocValues(bool docValues = true)
89+
{
90+
this._Mapping.DocValues = docValues;
91+
return this;
92+
}
8793
}
8894
}

src/Nest/Domain/Mapping/Descriptors/DateMappingDescriptor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,11 @@ public DateMappingDescriptor<T> Fields(Func<CorePropertiesDescriptor<T>, CorePro
8888
}
8989
return this;
9090
}
91+
92+
public DateMappingDescriptor<T> DocValues(bool docValues = true)
93+
{
94+
this._Mapping.DocValues = docValues;
95+
return this;
96+
}
9197
}
9298
}

src/Nest/Domain/Mapping/Descriptors/GeoPointMappingDescriptor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,11 @@ public GeoPointMappingDescriptor<T> FieldData(FieldDataNonStringMapping fieldDat
5555
this._Mapping.FieldData = fieldData;
5656
return this;
5757
}
58+
59+
public GeoPointMappingDescriptor<T> DocValues(bool docValues = true)
60+
{
61+
this._Mapping.DocValues = docValues;
62+
return this;
63+
}
5864
}
5965
}

src/Nest/Domain/Mapping/Types/BooleanMapping.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ public BooleanMapping():base("boolean")
3232

3333
[JsonProperty("copy_to")]
3434
public IEnumerable<PropertyPathMarker> CopyTo { get; set; }
35+
36+
[JsonProperty("doc_values")]
37+
public bool? DocValues { get; set; }
3538
}
3639
}

src/Nest/Domain/Mapping/Types/DateMapping.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,7 @@ public DateMapping():base("date")
3939
[JsonProperty("ignore_malformed")]
4040
public bool? IgnoreMalformed { get; set; }
4141

42+
[JsonProperty("doc_values")]
43+
public bool? DocValues { get; set; }
4244
}
4345
}

src/Nest/Domain/Mapping/Types/GeoPointMapping.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ public class GeoPointMapping : IElasticType
2929

3030
[JsonProperty("fielddata")]
3131
public FieldDataNonStringMapping FieldData { get; set; }
32+
33+
[JsonProperty("doc_values")]
34+
public bool? DocValues { get; set; }
3235
}
3336
}

0 commit comments

Comments
 (0)