You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Graham Maloon (JIRA)" <ji...@apache.org> on 2008/02/08 18:10:07 UTC

[jira] Created: (LUCENE-1170) query with AND and OR not retrieving correct results

query with AND and OR not retrieving correct results
----------------------------------------------------

                 Key: LUCENE-1170
                 URL: https://issues.apache.org/jira/browse/LUCENE-1170
             Project: Lucene - Java
          Issue Type: Bug
          Components: QueryParser
    Affects Versions: 2.3
         Environment: linux and windows
            Reporter: Graham Maloon


I was working with Lucene 1.4, and have now upgraded to 2.3.0 but there is still a problem that I am experiencing with the Queryparser
 
I am passing the following queries:
 
"big brother" - works fine
"big brother" AND dubai - works fine
"big brother" AND football - works fine
"big brother" AND dubai OR football - returns extra documents which contain "big brother" but do not contain either dubai or football.
"big brother" AND (dubai OR football) gives the same as the one above  
 
Am I doing something wrong?


-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1170) query with AND and OR not retrieving correct results

Posted by "Daniel Naber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567154#action_12567154 ] 

Daniel Naber commented on LUCENE-1170:
--------------------------------------

It's a known problem with QueryParser, see e.g. LUCENE-167

> query with AND and OR not retrieving correct results
> ----------------------------------------------------
>
>                 Key: LUCENE-1170
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1170
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.3
>         Environment: linux and windows
>            Reporter: Graham Maloon
>
> I was working with Lucene 1.4, and have now upgraded to 2.3.0 but there is still a problem that I am experiencing with the Queryparser
>  
> I am passing the following queries:
>  
> "big brother" - works fine
> "big brother" AND dubai - works fine
> "big brother" AND football - works fine
> "big brother" AND dubai OR football - returns extra documents which contain "big brother" but do not contain either dubai or football.
> "big brother" AND (dubai OR football) gives the same as the one above  
>  
> Am I doing something wrong?

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1170) query with AND and OR not retrieving correct results

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved LUCENE-1170.
---------------------------------

    Resolution: Won't Fix

I think its clear that the standard query parser does not operate with known or desired precedence rules. Try the Precedence query parser or enhance the current one, but I would say this is expected behavior at this point.

> query with AND and OR not retrieving correct results
> ----------------------------------------------------
>
>                 Key: LUCENE-1170
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1170
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.3
>         Environment: linux and windows
>            Reporter: Graham Maloon
>
> I was working with Lucene 1.4, and have now upgraded to 2.3.0 but there is still a problem that I am experiencing with the Queryparser
>  
> I am passing the following queries:
>  
> "big brother" - works fine
> "big brother" AND dubai - works fine
> "big brother" AND football - works fine
> "big brother" AND dubai OR football - returns extra documents which contain "big brother" but do not contain either dubai or football.
> "big brother" AND (dubai OR football) gives the same as the one above  
>  
> Am I doing something wrong?

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1170) query with AND and OR not retrieving correct results

Posted by "Graham Maloon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567550#action_12567550 ] 

Graham Maloon commented on LUCENE-1170:
---------------------------------------

Lucene-167 has a patch for the version in 2005. Has this not been incorporated into the newer releases to fix this problem?

> query with AND and OR not retrieving correct results
> ----------------------------------------------------
>
>                 Key: LUCENE-1170
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1170
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: QueryParser
>    Affects Versions: 2.3
>         Environment: linux and windows
>            Reporter: Graham Maloon
>
> I was working with Lucene 1.4, and have now upgraded to 2.3.0 but there is still a problem that I am experiencing with the Queryparser
>  
> I am passing the following queries:
>  
> "big brother" - works fine
> "big brother" AND dubai - works fine
> "big brother" AND football - works fine
> "big brother" AND dubai OR football - returns extra documents which contain "big brother" but do not contain either dubai or football.
> "big brother" AND (dubai OR football) gives the same as the one above  
>  
> Am I doing something wrong?

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org