Solr
  1. Solr
  2. SOLR-1095

StopFilterFactory should not use HashSet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical 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);
          }
      
      1. SOLR-1095.patch
        17 kB
        Grant Ingersoll

        Issue Links

          Activity

          Grant Ingersoll created issue -
          Grant Ingersoll made changes -
          Field Original Value New Value
          Link This issue is related to SOLR-663 [ SOLR-663 ]
          Grant Ingersoll made changes -
          Attachment SOLR-1095.patch [ 12404269 ]
          Grant Ingersoll made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.4 [ 12313351 ]
          Resolution Fixed [ 1 ]
          Grant Ingersoll made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Grant Ingersoll
              Reporter:
              Grant Ingersoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development