Skip to content

Commit 2a7c390

Browse files
author
moran
committed
lang property on the custom score query desc
1 parent 27fc39d commit 2a7c390

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: src/Nest/DSL/Query/CustomScoreQueryDescriptor.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ namespace Nest
88
{
99
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
1010
public class CustomScoreQueryDescriptor<T> : IQuery where T : class
11-
{
11+
{
12+
[JsonProperty(PropertyName = "lang")]
13+
internal string _Lang { get; set; }
14+
1215
[JsonProperty(PropertyName = "script")]
1316
internal string _Script { get; set; }
1417

@@ -24,6 +27,12 @@ internal bool IsConditionless
2427
{
2528
return this._Query == null || this._Query.IsConditionless;
2629
}
30+
}
31+
32+
public CustomScoreQueryDescriptor<T> Lang(string lang)
33+
{
34+
this._Lang = lang;
35+
return this;
2736
}
2837

2938
public CustomScoreQueryDescriptor<T> Query(Func<QueryDescriptor<T>, BaseQuery> querySelector)

0 commit comments

Comments
 (0)