oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabe Resneck (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query
Date Fri, 12 Nov 2010 19:19:26 GMT

     [ 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.


Mime
View raw message