Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 536FD7C17 for ; Tue, 15 Nov 2011 04:16:19 +0000 (UTC) Received: (qmail 31711 invoked by uid 500); 15 Nov 2011 04:16:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 31549 invoked by uid 500); 15 Nov 2011 04:16:17 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 31453 invoked by uid 99); 15 Nov 2011 04:16:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 04:16:15 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2011 04:16:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A5278830F6 for ; Tue, 15 Nov 2011 04:15:51 +0000 (UTC) Date: Tue, 15 Nov 2011 04:15:51 +0000 (UTC) From: "Shai Erera (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1431292541.29703.1321330551678.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1258088332.26797.1321280692410.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3573) TaxonomyReader.refresh() is broken, replace its logic with reopen(), following IR.reopen pattern MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150229#comment-13150229 ] Shai Erera commented on LUCENE-3573: ------------------------------------ I thought about it more, and I really think that we should go with option A. The common case is that the taxonomy index is not recreated, however it may be updated very frequently. TR.refresh() denotes exactly that -- it refreshes the internal state of the TaxonomyReader. This method must be very efficient. I.e., with NRT, people rely on IR.openIfChanged to only open new segments, which is what DTR.refresh() does (calls IR.openIfChanged). So putting the name aside, we should have the method X() which either returns null (and updates or not the internal state) or returns a new TR. Unfortunately refresh() is not a bad name (reload() sounds more drastic and less efficient), so maybe refreshIfChanged? > TaxonomyReader.refresh() is broken, replace its logic with reopen(), following IR.reopen pattern > ------------------------------------------------------------------------------------------------ > > Key: LUCENE-3573 > URL: https://issues.apache.org/jira/browse/LUCENE-3573 > Project: Lucene - Java > Issue Type: Bug > Components: modules/facet > Reporter: Doron Cohen > Assignee: Doron Cohen > Priority: Minor > Attachments: LUCENE-3573.patch > > > When recreating the taxonomy index, TR's assumption that categories are only added does not hold anymore. > As result, calling TR.refresh() will be incorrect at best, but usually throw an AIOOBE. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org