Skip to content

Commit 75c4389

Browse files
khalidabuhakmehrusscam
authored andcommitted
Precision on GeoSuggestContext Is A Single Value (#4091)
This should only be one value, and not an array. Closes #4089
1 parent 9b61a35 commit 75c4389

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Nest/Search/Suggesters/ContextSuggester/GeoSuggestContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public interface IGeoSuggestContext : ISuggestContext
1111
bool? Neighbors { get; set; }
1212

1313
[DataMember(Name = "precision")]
14-
IEnumerable<string> Precision { get; set; }
14+
string Precision { get; set; }
1515
}
1616

1717
[DataContract]
1818
public class GeoSuggestContext : SuggestContextBase, IGeoSuggestContext
1919
{
2020
public bool? Neighbors { get; set; }
2121

22-
public IEnumerable<string> Precision { get; set; }
22+
public string Precision { get; set; }
2323
public override string Type => "geo";
2424
}
2525

@@ -30,9 +30,9 @@ public class GeoSuggestContextDescriptor<T>
3030
{
3131
protected override string Type => "geo";
3232
bool? IGeoSuggestContext.Neighbors { get; set; }
33-
IEnumerable<string> IGeoSuggestContext.Precision { get; set; }
33+
string IGeoSuggestContext.Precision { get; set; }
3434

35-
public GeoSuggestContextDescriptor<T> Precision(params string[] precisions) => Assign(precisions, (a, v) => a.Precision = v);
35+
public GeoSuggestContextDescriptor<T> Precision(string precision) => Assign(precision, (a, v) => a.Precision = v);
3636

3737
public GeoSuggestContextDescriptor<T> Neighbors(bool? neighbors = true) => Assign(neighbors, (a, v) => a.Neighbors = v);
3838
}

0 commit comments

Comments
 (0)