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

Invalid Base exception in DateField.StringToTime()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Lucene.Net 2.9.4
    • Lucene.Net 2.9.4
    • Lucene.Net Core
    • None

    Description

      The Lucene.Net.Documents.DateField.StringToTime() method called by StringToDate() appears to specify an invalid value for the base in the .NET Convert.ToInt64() call. When a DateField value in a legacy index is read, or Lucene.NET 2.9.4 is used with legacy code that relies upon DateField, the following exception occurs whenever StringToDate() is called:

      System.ArgumentException: Invalid Base.
      at System.Convert.ToInt64(String value, Int32 fromBase)
      at Lucene.Net.Documents.DateField.StringToTime(String s)
      at Lucene.Net.Documents.DateField.StringToDate(String s)

      Attachments

        1. DateField.patch
          0.6 kB
          Digy
        2. LUCENENET-409.patch
          2 kB
          Digy

        Activity

          People

            digydigy Digy
            daedalus Neal Granroth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: