Skip to content

Commit efc54c8

Browse files
committed
Some doubles ToString() didnt use CultureInfo.InvarantCulture
1 parent 7d7825d commit efc54c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Nest/Resolvers/PathResolver.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.Linq;
45
using System.Text;
56

@@ -314,7 +315,7 @@ public string GetMoreLikeThisPathFor<T>(MoreLikeThisDescriptor<T> descriptor) wh
314315
if (!options._LikeText.IsNullOrEmpty())
315316
dict.Add("like_text", options._LikeText);
316317
if (options._TermMatchPercentage != null)
317-
dict.Add("percent_terms_to_match", options._TermMatchPercentage.ToString());
318+
dict.Add("percent_terms_to_match", options._TermMatchPercentage.Value.ToString(CultureInfo.InvariantCulture));
318319
if (options._MinTermFrequency != null)
319320
dict.Add("min_term_freq", options._MinTermFrequency.ToString());
320321
if (options._MaxQueryTerms != null)
@@ -328,9 +329,9 @@ public string GetMoreLikeThisPathFor<T>(MoreLikeThisDescriptor<T> descriptor) wh
328329
if (options._MaxWordLength != null)
329330
dict.Add("max_word_len", options._MaxWordLength.ToString());
330331
if (options._BoostTerms != null)
331-
dict.Add("boost_terms", options._BoostTerms.ToString());
332+
dict.Add("boost_terms", options._BoostTerms.Value.ToString(CultureInfo.InvariantCulture));
332333
if (options._Boost != null)
333-
dict.Add("boost", options._Boost.ToString());
334+
dict.Add("boost", options._Boost.Value.ToString(CultureInfo.InvariantCulture));
334335
if (!options._Analyzer.IsNullOrEmpty())
335336
dict.Add("analyzer", options._Analyzer);
336337
}

0 commit comments

Comments
 (0)