From 2a7c39078adddddd4334cf55be5a5f96d899af84 Mon Sep 17 00:00:00 2001 From: moran Date: Wed, 7 Aug 2013 18:58:45 +0300 Subject: [PATCH] lang property on the custom score query desc --- src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)