Skip to content

Commit c967b3b

Browse files
committed
Merge pull request #329 from Moran007/custom-query-lang
Custom query lang
2 parents 5f8bf94 + 2a7c390 commit c967b3b

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)