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

Validation issue in FieldType#setDimensions?

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.2, 7.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: