Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-533

StringValue of NumberField is localized

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Lucene.Net 3.0.3, Lucene.Net 3.6, Lucene.Net 4.0
    • Fix Version/s: None
    • Component/s: Lucene.Net Core
    • Labels:

      Description

      The StringValue property of Lucene.Net.Documents.NumericField returns a localized string value (ie. confusion about the decimal separation character). IMHO it should be a following the invariant culture whenever possible.

      Suggested fix:

      public override string StringValue
      {
      get

      { if (fieldsData == null) return null; if (fieldsData is IConvertible) return ((IConvertible)fieldsData).ToString(CultureInfo.InvariantCulture); return fieldsData.ToString(); }

      }

        Attachments

          Activity

            People

            • Assignee:
              itamar Itamar Syn-Hershko
              Reporter:
              mortengormmadsen Morten Gorm Madsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified