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

StringValue of NumberField is localized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Lucene.Net 3.0.3, Lucene.Net 3.6, Lucene.Net 4.0
    • None
    • Lucene.Net Core

    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

            itamar Itamar Syn-Hershko
            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