11using System ;
22using System . Collections . Generic ;
3+ using System . Globalization ;
34using System . Linq ;
45using 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