Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1320

CapitalizationFilterFactory's minWordLength not working properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.4
    • 1.4
    • Schema and Analysis
    • None

    Description

      To see the problem first hand, add to schema.xml:

      <fieldType name="cap" class="solr.TextField" positionIncrementGap="100">
        <analyzer>
          <tokenizer class="solr.StandardTokenizerFactory"/>
          <filter class="solr.CapitalizationFilterFactory"
              minWordLength="2"/> 
        </analyzer>
       </fieldType>
      

      Then in analysis.jsp, analyze "a or and". All terms get capitalized.

      This has to do with the length calculation being wrong in CapitalizationFilter#next.

      Attachments

        1. SOLR-1320.patch
          2 kB
          Erik Hatcher

        Activity

          People

            ehatcher Erik Hatcher
            ehatcher Erik Hatcher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: