[ http://issues.apache.org/jira/browse/LUCENE-395?page=comments#action_12331531 ]
Hoss Man commented on LUCENE-395: --------------------------------- I freely admit that I didn't give a lot of thought to incrimenting maxCoord. I did it only because if I didn't, coordinator.coordFactor() generated ArrayIndexOutOfBoundsExceptions -- it assumes that the number of counted matches (nrMatchers) should be used to determine which element of coordFactor should be used, so I assumed that maxCoord allways needed to be equal the the maximum number of potential counted matches. Likewise, I put the code in Coordinator.init() instead of initCountingSumScorer() for the sole reason that since i was incrimenting maxCoord, I needed to do it before coordFactors[] was initialized. (allthough, I suppose it could have happened in initCountingSumScorer(), prior to the call to coordinator.init()). Did I mention I'm way over my head as far as this patch goes? ... I don't honestly understand the meaning/purpose of "coordination" -- I just kind of did what I did because it seemed to work (and made some sense in the context of hte existing code). > 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, > LUCENE-395.patch, TestBooleanMinShouldMatch.java, > 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ć" "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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]