You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Gabe Resneck (JIRA)" <ji...@apache.org> on 2010/11/05 00:20:43 UTC

[jira] Created: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene 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


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.


[jira] Assigned: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann reassigned OODT-57:
-------------------------------------

    Assignee: Chris A. Mattmann

> 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
>            Assignee: Chris A. Mattmann
>            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.


[jira] Commented: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931626#action_12931626 ] 

Chris A. Mattmann commented on OODT-57:
---------------------------------------

Gabe, patch applied fine to my local checkout. All unit tests pass:

Results :

Tests run: 77, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 57 seconds
[INFO] Finished at: Fri Nov 12 20:59:47 PST 2010
[INFO] Final Memory: 40M/96M
[INFO] ------------------------------------------------------------------------
[chipotle:oodt/trunk/filemgr] mattmann% 


I'll commit this now...

> 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
>            Assignee: Chris A. Mattmann
>            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.


[jira] Resolved: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann resolved OODT-57.
-----------------------------------

    Resolution: Fixed

- patch applied in r1034648. Thanks, Gabe, looks good!

> 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
>            Assignee: Chris A. Mattmann
>            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.


[jira] Updated: (OODT-57) LuceneCatalog.getNumHits() doesn't properly translate the given Query object into the equivalent Lucene query

Posted by "Gabe Resneck (JIRA)" <ji...@apache.org>.
     [ 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.