Return-Path: Delivered-To: apmail-incubator-oodt-commits-archive@minotaur.apache.org Received: (qmail 67601 invoked from network); 12 Nov 2010 19:19:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Nov 2010 19:19:16 -0000 Received: (qmail 25130 invoked by uid 500); 12 Nov 2010 19:19:47 -0000 Delivered-To: apmail-incubator-oodt-commits-archive@incubator.apache.org Received: (qmail 25102 invoked by uid 500); 12 Nov 2010 19:19:47 -0000 Mailing-List: contact oodt-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oodt-dev@incubator.apache.org Delivered-To: mailing list oodt-commits@incubator.apache.org Received: (qmail 25095 invoked by uid 99); 12 Nov 2010 19:19:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Nov 2010 19:19:47 +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; Fri, 12 Nov 2010 19:19:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oACJJQSP013986 for ; Fri, 12 Nov 2010 19:19:26 GMT Message-ID: <16755133.50671289589566229.JavaMail.jira@thor> Date: Fri, 12 Nov 2010 14:19:26 -0500 (EST) From: "Gabe Resneck (JIRA)" To: oodt-commits@incubator.apache.org Subject: [jira] Updated: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query In-Reply-To: <7656437.18631288912843377.JavaMail.jira@thor> 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/OODT-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gabe Resneck updated OODT-57: ----------------------------- Attachment: OODT-57.gabe-resneck.111210.patch.txt This patch shows the changes made to LuceneCatalog.getNumHits() that fix the problem and also an addition to the unit tests for the LuceneCatalog class in order to ensure that such a problem does not return. By examining the diff, one will see that the issue is caused by the incorrect translation from the OODT Query struct to an equivalent query using Lucene structs. The old method uses an iterative method that doesn't account for a query tree with a height greater than 1. To fix this, I have switched the translation code to instead use LuceneCatalog.getQuery() which correctly uses a recursive procedure to translate the query. > LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query > ------------------------------------------------------------------------------------------------------------- > > Key: OODT-57 > URL: https://issues.apache.org/jira/browse/OODT-57 > Project: OODT > Issue Type: Bug > Components: file manager > Affects Versions: 0.1-incubating > Reporter: Gabe Resneck > Priority: Minor > Fix For: 0.2-incubating > > Attachments: OODT-57.gabe-resneck.111210.patch.txt > > > Presently, the getNumHits() method reconstructs the given query by only translating the queryCriteria that are direct children of the Query object. This means that the only queries that receive correct results from this method are those that contain only one term or range criterion. > This bug can easily be fixed by instead using a recursive procedure that will translate each criterion into data understood by Lucene before doing the same to its children. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.