lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (LUCENE-395) CoordConstrainedBooleanQuery + QueryParser support
Date Tue, 01 Nov 2005 20:57:56 GMT
    [ ] 

Hoss Man commented on LUCENE-395:

To recap: 

 * The orriginal bug proposed a new Query class, and provided a sample query parser that leveraged
 * subsequent discussions have led to a patch for BooleanQuery and BooleanScorer to support
this functionality without needing a new class

Looking at the example query parser for the first time today, I don't think it's a very clean
way to proceed - if for no other reason then those provided by the other...

        //Note (mis)use of fieldname "min_coord" to pass the required parameter - a more formal
        //support for passing query function_names and parameters to user-defined query factories

        //would be a very useful addition to the QueryParser base class

One idea that occured to me earlier today, is that "~" could be used to indicate the  minNrShouldMatch.
 This occured to me becuase specifying a "tolerance" in the number of optional subclauses
seems similar to me to specifying the slop in a phrase query.

I don't have a patch for this, i just wanted to post it (in case i get hit by a bus).

> 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,
> 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