lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.elschot (JIRA)" <>
Subject [jira] Commented: (LUCENE-395) CoordConstrainedBooleanQuery + QueryParser support
Date Thu, 06 Oct 2005 18:29:48 GMT
    [ ] 

paul.elschot commented on LUCENE-395:

The patch applies cleanly and all tests pass including the new TestBooleanMinShouldMatch.

The code to tranform the optional scorers into a single required one with a minimum number
of matches
looks good, it's easy to understand and the tests pass.
I'm not really happy with the place of this code, it would be better in the initCountingSumScorer()
method of BooleanScorer2.

Also I don't think maxCoord should be increased when this extra required scorer is introduced,
because this new required scorer can be completely ignored for coordination, it is only a
way to
get the minimum number of required scorers. I'm not sure about this, though.
Perhaps a testcase could be added that compares the score with and without a minimum
number of matches on documents that match anyway.

I'll keep this in my working copy and work on the code a bit, probably during next week.
Please feel free to beat me to it.

Paul Elschot

> CoordConstrainedBooleanQuery + QueryParser support
> --------------------------------------------------
>          Key: LUCENE-395
>          URL:
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Search
>     Versions: unspecified
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Mark Harwood
>     Assignee: Lucene Developers
>     Priority: Minor
>  Attachments:,,,, LUCENE-395.patch, LUCENE-395.patch, LUCENE-395.patch,,,
> 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:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message