Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 91205 invoked from network); 24 Jun 2010 12:13:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Jun 2010 12:13:17 -0000 Received: (qmail 96743 invoked by uid 500); 24 Jun 2010 12:13:16 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 96285 invoked by uid 500); 24 Jun 2010 12:13: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 96274 invoked by uid 99); 24 Jun 2010 12:13:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 12:13:11 +0000 X-ASF-Spam-Status: No, hits=-1542.2 required=10.0 tests=ALL_TRUSTED,AWL 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; Thu, 24 Jun 2010 12:13:10 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5OCCnge014380 for ; Thu, 24 Jun 2010 12:12:50 GMT Message-ID: <20352329.37941277381569368.JavaMail.jira@thor> Date: Thu, 24 Jun 2010 08:12:49 -0400 (EDT) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-2142) FieldCache.getStringIndex should not throw exception if term count exceeds doc count 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-2142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless resolved LUCENE-2142. ---------------------------------------- Resolution: Fixed > FieldCache.getStringIndex should not throw exception if term count exceeds doc count > ------------------------------------------------------------------------------------ > > Key: LUCENE-2142 > URL: https://issues.apache.org/jira/browse/LUCENE-2142 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Reporter: Michael McCandless > Assignee: Michael McCandless > Priority: Minor > Fix For: 2.9.4, 3.0.3, 3.1, 4.0 > > Attachments: LUCENE-2142-fix-3x.patch, LUCENE-2142-fix-trunk.patch, LUCENE-2142-trunk.patch > > > Spinoff of LUCENE-2133/LUCENE-831. > Currently FieldCache cannot handle more than one value per field. > We may someday want to fix that... but until that day: > FieldCache.getStringIndex currently does a simplistic check to try to > catch when you've accidentally allowed more than one term per field, > by testing if the number of unique terms exceeds the number of > documents. > The problem is, this is not a perfect check, in that it allows false > negatives (you could have more than one term per field for some docs > and the check won't catch you). > Further, the exception thrown is the unchecked RuntimeException. > So this means... you could happily think all is good, until some day, > well into production, once you've updated enough docs, suddenly the > check will catch you and throw an unhandled exception, stopping all > searches [that need to sort by this string field] in their tracks. > It's not gracefully degrading. > I think we should simply remove the test, ie, if you have more terms > than docs then the terms simply overwrite one another. -- 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