Solr
  1. Solr
  2. SOLR-1320

CapitalizationFilterFactory's minWordLength not working properly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4
    • Component/s: Schema and Analysis
    • Labels:
      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.

      1. SOLR-1320.patch
        2 kB
        Erik Hatcher

        Activity

        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4
        Hide
        Grant Ingersoll added a comment -

        Fixed in SOLR-1342.

        Show
        Grant Ingersoll added a comment - Fixed in SOLR-1342 .
        Hide
        Robert Muir added a comment -

        i think this is corrected in SOLR-1342... (somehow i did not see this issue)

        Show
        Robert Muir added a comment - i think this is corrected in SOLR-1342 ... (somehow i did not see this issue)
        Hide
        Hoss Man added a comment -

        issue has patch and affects 1.4 ... setting fix for 1.4

        Show
        Hoss Man added a comment - issue has patch and affects 1.4 ... setting fix for 1.4
        Hide
        Erik Hatcher added a comment -

        This patch fixes the case mentioned. I'll commit in a day or so unless someone sees something wrong with it. Ryan?

        Show
        Erik Hatcher added a comment - This patch fixes the case mentioned. I'll commit in a day or so unless someone sees something wrong with it. Ryan?
        Hide
        Ryan McKinley added a comment -

        dooh. thanks erik!

        Show
        Ryan McKinley added a comment - dooh. thanks erik!

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Erik Hatcher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development