Skip to content

Commit b1d4bcb

Browse files
committed
added missing store, doc_values, compress and compress_threshold properties for binary mapping
1 parent a63e8a1 commit b1d4bcb

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

Diff for: src/Nest/Domain/Mapping/Descriptors/BinaryMappingDescriptor.cs

+24
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,30 @@ public BinaryMappingDescriptor<T> IndexName(string indexName)
2626
return this;
2727
}
2828

29+
public BinaryMappingDescriptor<T> DocValues(bool docValues = true)
30+
{
31+
this._Mapping.DocValues = docValues;
32+
return this;
33+
}
34+
35+
public BinaryMappingDescriptor<T> Store(bool store = true)
36+
{
37+
this._Mapping.Store = store;
38+
return this;
39+
}
40+
41+
public BinaryMappingDescriptor<T> Compress(bool compress = true )
42+
{
43+
this._Mapping.Compress = compress;
44+
return this;
45+
}
46+
47+
public BinaryMappingDescriptor<T> CompressThreshold(string compressThreshold)
48+
{
49+
this._Mapping.CompressThreshold = compressThreshold;
50+
return this;
51+
}
52+
2953
public BinaryMappingDescriptor<T> CopyTo(params string[] fields)
3054
{
3155
this._Mapping.CopyTo = fields.Select(f => (PropertyPathMarker)f);

Diff for: src/Nest/Domain/Mapping/Types/BinaryMapping.cs

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ public class BinaryMapping : IElasticType, IElasticCoreType
2525
[JsonProperty("index_name")]
2626
public string IndexName { get; set; }
2727

28+
[JsonProperty("doc_values")]
29+
public bool? DocValues { get; set; }
30+
31+
[JsonProperty("store")]
32+
public bool? Store { get; set; }
33+
34+
[JsonProperty("compress")]
35+
public bool? Compress { get; set; }
36+
37+
[JsonProperty("compress_threshold")]
38+
public string CompressThreshold { get; set; }
39+
2840
[JsonProperty("copy_to")]
2941
public IEnumerable<PropertyPathMarker> CopyTo { get; set; }
3042
}

0 commit comments

Comments
 (0)