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

StopFilterFactory should not use HashSet

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      Rev 680935 of StopFilterFactory introduced some changes that can cause poor performance do to the use of HashSet instead of CharArraySet in the inform() method. I noticed this while profiling http://www.lucidimagination.com/search/document/f46f0edfc439356c/solr_user_upgrade_from_1_2_to_1_3_gives_3x_slowdown whereby 20% of the time spent in indexing occurred in Collections.addAll() in the Lucene StopFilter due to the execution of the else clause in the lines:

      if (stopWords instanceof CharArraySet) {
            this.stopWords = (CharArraySet)stopWords;
          } else {
            this.stopWords = new CharArraySet(stopWords.size(), ignoreCase);
            this.stopWords.addAll(stopWords);
          }
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              gsingers Grant Ingersoll
              Reporter:
              gsingers Grant Ingersoll

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment