You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Brian Foster (Commented) (JIRA)" <ji...@apache.org> on 2011/11/30 08:59:39 UTC

[jira] [Commented] (OODT-355) QueryTool treats Lucene list of term queries as ANDed instead of ORed

    [ https://issues.apache.org/jira/browse/OODT-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159889#comment-13159889 ] 

Brian Foster commented on OODT-355:
-----------------------------------

NOTE: this change would change query results for existing Lucene query which uses this syntax... while integrating CAS-CLI with CAS-Filemgr i created an action, LuceneQuery, which ports QueryTool's Lucene query to an action... in this process i was improved a few things with it, like make it support the OR operator... in fact QueryTool's current implementation will treat a specified Lucene OR as an AND: "NominalDate=2011-01-20 AND Group=test" and "NominalDate=2011-01-20 OR Group=test" will currently give the same query results
                
> QueryTool treats Lucene list of term queries as ANDed instead of ORed
> ---------------------------------------------------------------------
>
>                 Key: OODT-355
>                 URL: https://issues.apache.org/jira/browse/OODT-355
>             Project: OODT
>          Issue Type: Bug
>          Components: file manager
>    Affects Versions: 0.3
>         Environment: none
>            Reporter: Brian Foster
>            Assignee: Brian Foster
>            Priority: Minor
>             Fix For: 0.4
>
>
> For example:
> {code}
> NominalDate:2011-01-20 Group:test
> {code}
> is treated as:
> {code}
> NominalDate=2011-01-20 AND Group=test
> {code}
> when really it should be:
> {code}
> NominalDate=2011-01-20 OR Group=test
> {code}
> From http://lucene.apache.org/java/2_9_1/queryparsersyntax.html:
> Boolean Operators
> Boolean operators allow terms to be combined through logic operators. Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).
> The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.
> To search for documents that contain either "jakarta apache" or just "jakarta" use the query:
> "jakarta apache" jakarta
> or
> "jakarta apache" OR jakarta

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira