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 2B0B2EA61 for ; Wed, 20 Feb 2013 19:17:14 +0000 (UTC) Received: (qmail 7716 invoked by uid 500); 20 Feb 2013 19:17:13 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 7655 invoked by uid 500); 20 Feb 2013 19:17:12 -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 7646 invoked by uid 99); 20 Feb 2013 19:17:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2013 19:17:12 +0000 Date: Wed, 20 Feb 2013 19:17:12 +0000 (UTC) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LUCENE-4790) FieldCache.getDocTermOrds back to the future bug 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/LUCENE-4790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Muir updated LUCENE-4790: -------------------------------- Attachment: LUCENE-4790.patch Here's a test with my proposed fix. Again its to just make the livedocs always an explicit parameter so there are no traps or confusion, and FieldCacheImpl passes null always. > FieldCache.getDocTermOrds back to the future bug > ------------------------------------------------ > > Key: LUCENE-4790 > URL: https://issues.apache.org/jira/browse/LUCENE-4790 > Project: Lucene - Core > Issue Type: Bug > Reporter: Robert Muir > Attachments: LUCENE-4790.patch > > > Found while working on LUCENE-4765: > FieldCache.getDocTermOrds unsafely "bakes in" liveDocs into its structure. > This means in cases if you have readers at two points in time (r1, r2), and you happen to call getDocTermOrds first on r2, then call it on r1, the results will be incorrect. > Simple fix is to make DocTermOrds uninvert take liveDocs explicitly: FieldCacheImpl always passes null, Solr's UninvertedField just keeps doing what its doing today (since its a top-level reader, and cached somewhere else). > Also DocTermOrds had a telescoping ctor that was uninverting twice. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators 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