Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 8381 invoked from network); 26 Mar 2010 23:02:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Mar 2010 23:02:49 -0000 Received: (qmail 65540 invoked by uid 500); 26 Mar 2010 23:02:48 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 65415 invoked by uid 500); 26 Mar 2010 23:02:48 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 65407 invoked by uid 99); 26 Mar 2010 23:02:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 23:02:48 +0000 X-ASF-Spam-Status: No, hits=-1148.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 23:02:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 58106234C4EF for ; Fri, 26 Mar 2010 23:02:27 +0000 (UTC) Message-ID: <656357744.520951269644547346.JavaMail.jira@brutus.apache.org> Date: Fri, 26 Mar 2010 23:02:27 +0000 (UTC) From: "Yonik Seeley (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-1850) KeepWordFilter can be slow at query time if wordlist is large In-Reply-To: <1432004421.519821269639387213.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850392#action_12850392 ] Yonik Seeley commented on SOLR-1850: ------------------------------------ Yes, that's definitely the way to go. > KeepWordFilter can be slow at query time if wordlist is large > ------------------------------------------------------------- > > Key: SOLR-1850 > URL: https://issues.apache.org/jira/browse/SOLR-1850 > Project: Solr > Issue Type: Improvement > Components: Schema and Analysis > Affects Versions: 1.4 > Reporter: John Wang > > In the case when "Set words" is large, constructing a KeepWordFilter at query time is very costly because of the construction (copy) of the set, e.g.: > this.words = new CharArraySet(words, ignoreCase); > This call does an addAll on the set, and is done for each query, and is the same work. > Suggestion: overload the constructor and expose the CharArraySet, e.g.: > public KeepWordFilter(TokenStream in, CharArraySet words ) { > super(in); > this.words = words; > this.termAtt = (TermAttribute)addAttribute(TermAttribute.class); > } > This allows the ability to have CharArraySet to be constructed once staticly for the application instead at query time. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.