You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2005/10/03 21:14:50 UTC

[jira] Updated: (LUCENE-395) CoordConstrainedBooleanQuery + QueryParser support

     [ http://issues.apache.org/jira/browse/LUCENE-395?page=all ]

Hoss Man updated LUCENE-395:
----------------------------

    Attachment: LUCENE-395.patch

Okay - a new patch, and this one (amazingly) seems to work.  All existing tests in SVN pass, as well as the new ones I've attached to this bug.

The one thing still not quite accounted for is what the behavior should be if/when clients set the minNrShouldMatch to be a value higher then the number of optional clauses -- or what the behavior should be if there is only one optional clause, and minNrShouldMatch==1 ... should it be treated as if it's required, or is that a miss-use of the api?   Should these cases be checked in BooleanScorer2, or in BooleanQuery?



> CoordConstrainedBooleanQuery + QueryParser support
> --------------------------------------------------
>
>          Key: LUCENE-395
>          URL: http://issues.apache.org/jira/browse/LUCENE-395
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Search
>     Versions: unspecified
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Mark Harwood
>     Assignee: Lucene Developers
>     Priority: Minor
>  Attachments: CoordConstrainedBooleanQuery.java, CoordConstrainedBooleanQuery.java, CustomQueryParserExample.java, CustomQueryParserExample.java, LUCENE-395.patch, LUCENE-395.patch, TestBooleanMinShouldMatch.java, TestBooleanMinShouldMatch.java
>
> Attached 2 new classes:
> 1) CoordConstrainedBooleanQuery
> A boolean query that only matches if a specified number of the contained clauses
> match. An example use might be a query that returns a list of books where ANY 2
> people from a list of people were co-authors, eg:
> "Lucene In Action" would match ("Erik Hatcher" "Otis Gospodneti&#263;" "Mark Harwood"
> "Doug Cutting") with a minRequiredOverlap of 2 because Otis and Erik wrote that.
> The book "Java Development with Ant" would not match because only 1 element in
> the list (Erik) was selected.
> 2) CustomQueryParserExample
> A customised QueryParser that allows definition of
> CoordConstrainedBooleanQueries. The solution (mis)uses fieldnames to pass
> parameters to the custom query.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org