Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2622

Index analizers that extends StandardAnalyzer need to implement reusableTokenStream() since jackrabbit 2.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • 2.1, 2.1.1, 2.1.2, 2.1.3, 2.2
    • None
    • None
    • None

    Description

      I just tried migrating an existing project which was using jackrabbit 2.0.0 to 2.1.0.

      We have an index analyzer configured which filters accented chars:

      public class ItalianSnowballAnalyzer extends StandardAnalyzer
      {
      
          @Override
          public TokenStream tokenStream(String fieldName, Reader reader)
          {
              return new ISOLatin1AccentFilter(new LowerCaseFilter((super.tokenStream(fieldName, reader))));
          }
      
      }
      

      The project has a good number of unit tests, an xml is loaded in a memory-only jackrabbit repository and several queries are checked against expected results.
      After migrating to 2.1.0 none of the tests that relied on the Index analizer work anymore, for example searching for "test" doesn't find anymore nodes containing "tèst".

      Upgrading to jackrabbit 2.1.0 is the only change done (no changes in the configuration/code or other libraries at all). Rolling back to the 2.0.0 dependency is enough to make all the tests working again.
      I've checked the changes in 2.1 but I couldn't find any apparently related change. Also note that I was already using the patch in JCR-2504 also before (configuration loading works fine in the unpatched 2.1). Another point is that the configured IndexAnalyzer still gets actually called during our tests (checked in debug mode).

      Any idea?

      Attachments

        1. JCR-2622-tests_and_patch.diff
          4 kB
          Fabrizio Giustina

        Activity

          People

            Unassigned Unassigned
            fgiust Fabrizio Giustina
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: