Skip to content

Commit f48bf00

Browse files
committed
Merge pull request #131 from jpcofr/master
Solution to issue '#130 SearchDescriptor.TrackScores() generates elastic unrecognized string'
2 parents 14aadbb + 079c059 commit f48bf00

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Nest/DSL/Descriptors/SearchDescriptor.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public SearchDescriptor()
2727
internal string _Scroll { get; set; }
2828
internal bool _AllIndices { get; set; }
2929
internal bool _AllTypes { get; set; }
30-
30+
3131
/// <summary>
3232
/// Whiter conditionless queries are allowed or not
3333
/// </summary>
34-
internal bool _Strict { get; set; }
34+
internal bool _Strict { get; set; }
3535

3636
/// <summary>
3737
/// The indices to execute the search on. Defaults to the default index
@@ -169,7 +169,7 @@ public SearchDescriptor<T> Strict(bool strict = true)
169169
internal bool? _Explain { get; set; }
170170
[JsonProperty(PropertyName = "version")]
171171
internal bool? _Version { get; set; }
172-
[JsonProperty(PropertyName = "track_scores ")]
172+
[JsonProperty(PropertyName = "track_scores")]
173173
internal bool? _TrackScores { get; set; }
174174

175175
[JsonProperty(PropertyName = "min_score")]
@@ -785,8 +785,8 @@ public SearchDescriptor<T> Query(Func<QueryDescriptor<T>, BaseQuery> query)
785785

786786
var bq = query(q);
787787
if (this._Strict && bq.IsConditionless)
788-
throw new DslException("Query resulted in a conditionless query:\n{0}".F(JsonConvert.SerializeObject(bq, Formatting.Indented)));
789-
788+
throw new DslException("Query resulted in a conditionless query:\n{0}".F(JsonConvert.SerializeObject(bq, Formatting.Indented)));
789+
790790
else if (bq.IsConditionless)
791791
return this;
792792
this._Query = bq;
@@ -837,14 +837,14 @@ public SearchDescriptor<T> Filter(Func<FilterDescriptor<T>, BaseFilter> filter)
837837
{
838838
filter.ThrowIfNull("filter");
839839
var f = new FilterDescriptor<T>().Strict(this._Strict);
840-
840+
841841
var bf = filter(f);
842842
if (this._Strict && bf.IsConditionless)
843843
throw new DslException("Filter resulted in a conditionless filter:\n{0}".F(JsonConvert.SerializeObject(bf, Formatting.Indented)));
844844

845845
else if (bf.IsConditionless)
846-
return this;
847-
846+
return this;
847+
848848

849849
this._Filter = bf;
850850
return this;

0 commit comments

Comments
 (0)