From java-dev-return-30664-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Fri Feb 06 22:43:38 2009 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 21723 invoked from network); 6 Feb 2009 22:43:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2009 22:43:38 -0000 Received: (qmail 97782 invoked by uid 500); 6 Feb 2009 22:43:32 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 97572 invoked by uid 500); 6 Feb 2009 22:43:31 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 97563 invoked by uid 99); 6 Feb 2009 22:43:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 14:43:31 -0800 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG 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, 06 Feb 2009 22:43:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3277B234C4B2 for ; Fri, 6 Feb 2009 14:43:02 -0800 (PST) Message-ID: <1866495128.1233960182205.JavaMail.jira@brutus> Date: Fri, 6 Feb 2009 14:43:02 -0800 (PST) From: "Jason Rutherglen (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1314) IndexReader.clone In-Reply-To: <1154247101.1214238525346.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Rutherglen updated LUCENE-1314: ------------------------------------- Attachment: LUCENE-1314.patch Now that we've got IndexReader.getSequentialSubReaders(), users may try to clone the sub-readers which throws the exception below. I'd like to support cloning individual segment readers because some cases require cloning on the existing segments, without reloading the new segments. The use case is realtime search where the ram index is being flushed to disk in the background and we don't need IR.clone to also open the new segments. The old segments could be acquiring deletes as the background flush to disk is occurring. I suppose I could write a hack such that a clone is performed on the multireader, then only the old segments are pulled out segments and deleted from. Attached is a method TestIndexReaderClone.testCloneSubreaders that tests individual segment reader clone. {code} java.lang.NullPointerException at org.apache.lucene.index.DirectoryIndexReader.clone(DirectoryIndexReader.java:171) at org.apache.lucene.index.DirectoryIndexReader.clone(DirectoryIndexReader.java:162) at org.apache.lucene.index.TestIndexReaderClone.testCloneSubreaders(TestIndexReaderClone.java:46) {code} > IndexReader.clone > ----------------- > > Key: LUCENE-1314 > URL: https://issues.apache.org/jira/browse/LUCENE-1314 > Project: Lucene - Java > Issue Type: New Feature > Components: Index > Affects Versions: 2.3.1 > Reporter: Jason Rutherglen > Assignee: Michael McCandless > Priority: Minor > Fix For: 2.9 > > Attachments: LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, LUCENE-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch, lucene-1314.patch > > > Based on discussion http://www.nabble.com/IndexReader.reopen-issue-td18070256.html. The problem is reopen returns the same reader if there are no changes, so if docs are deleted from the new reader, they are also reflected in the previous reader which is not always desired behavior. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org