diff --git a/src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs b/src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs index d0a2a4ae4ab..eca42d668d4 100644 --- a/src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs +++ b/src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs @@ -8,7 +8,10 @@ namespace Nest { [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class CustomScoreQueryDescriptor : IQuery where T : class - { + { + [JsonProperty(PropertyName = "lang")] + internal string _Lang { get; set; } + [JsonProperty(PropertyName = "script")] internal string _Script { get; set; } @@ -24,6 +27,12 @@ internal bool IsConditionless { return this._Query == null || this._Query.IsConditionless; } + } + + public CustomScoreQueryDescriptor Lang(string lang) + { + this._Lang = lang; + return this; } public CustomScoreQueryDescriptor Query(Func, BaseQuery> querySelector)