Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7389

Validation issue in FieldType#setDimensions?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.2, 7.0
    • None
    • None
    • New

    Description

      It compares if the dimensionCount is larger than PointValues.MAX_NUM_BYTES while this constant should be compared to dimensionNumBytes instead?

      So this if statement:

      if (dimensionCount > PointValues.MAX_NUM_BYTES) {
            throw new IllegalArgumentException("dimensionNumBytes must be <= " + PointValues.MAX_NUM_BYTES + "; got " + dimensionNumBytes);
          }
      

      Should be:

      if (dimensionNumBytes > PointValues.MAX_NUM_BYTES) {
            throw new IllegalArgumentException("dimensionNumBytes must be <= " + PointValues.MAX_NUM_BYTES + "; got " + dimensionNumBytes);
          }
      

      Attachments

        1. LUCENE-7383.patch
          2 kB
          Martijn van Groningen

        Activity

          People

            Unassigned Unassigned
            martijn.v.groningen Martijn van Groningen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: