Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 42267 invoked from network); 7 Dec 2010 22:31:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Dec 2010 22:31:26 -0000 Received: (qmail 97707 invoked by uid 500); 7 Dec 2010 22:31:24 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 97647 invoked by uid 500); 7 Dec 2010 22:31:24 -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 97640 invoked by uid 99); 7 Dec 2010 22:31:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 22:31:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 22:31:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oB7MV1FO004513 for ; Tue, 7 Dec 2010 22:31:01 GMT Message-ID: <24797343.1971291761061059.JavaMail.jira@thor> Date: Tue, 7 Dec 2010 17:31:01 -0500 (EST) From: "Simon Willnauer (JIRA)" To: dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2802) DirectoryReader ignores NRT SegmentInfos in #isOptimized() In-Reply-To: <14604998.127861291642870786.JavaMail.jira@thor> 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-2802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Willnauer updated LUCENE-2802: ------------------------------------ Attachment: LUCENE-2802.patch here is a final patch - i will commit later! > DirectoryReader ignores NRT SegmentInfos in #isOptimized() > ---------------------------------------------------------- > > Key: LUCENE-2802 > URL: https://issues.apache.org/jira/browse/LUCENE-2802 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 3.1, 4.0 > Reporter: Simon Willnauer > Assignee: Simon Willnauer > Attachments: LUCENE-2802.patch, LUCENE-2802.patch, LUCENE-2802.patch > > > DirectoryReader only takes shared (with IW) SegmentInfos into account in DirectoryReader#isOptimized(). This can return true even if the actual realtime reader sees more than one segments. > {code} > public boolean isOptimized() { > ensureOpen(); > // if segmentsInfos changes in IW this can return false positive > return segmentInfos.size() == 1 && !hasDeletions(); > } > {code} > DirectoryReader should check if this reader has a non-nul segmentInfosStart and use that instead -- 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org