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

Argument validation for TokenFilters having numeric constructor parameter(s)

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.7
    • 4.8, 6.0
    • modules/analysis
    • None
    • New

    Description

      Some TokenFilters have numeric arguments in their constructors. They should throw IllegalArgumentException for negative or meaningless values.

      Here is some examples that demonstrates invalid/meaningless arguments :

       <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="-10" />
      
       <filter class="solr.LengthFilterFactory" min="-5" max="-1" />
      
       <filter class="solr.LimitTokenPositionFilterFactory" maxTokenPosition="-3" />
      

      Attachments

        1. LUCENE-5559.patch
          8 kB
          Ahmet Arslan
        2. LUCENE-5559.patch
          32 kB
          Ahmet Arslan
        3. LUCENE-5559.patch
          12 kB
          Ahmet Arslan
        4. LUCENE-5559.patch
          11 kB
          Ahmet Arslan
        5. LUCENE-5559.patch
          7 kB
          Ahmet Arslan

        Activity

          People

            Unassigned Unassigned
            iorixxx Ahmet Arslan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: