Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-395

CoordConstrainedBooleanQuery + QueryParser support

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • core/search
    • None
    • Operating System: other
      Platform: Other

    • 35284

    Description

      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.

      Attachments

        1. TestBooleanMinShouldMatch.java
          6 kB
          Chris M. Hostetter
        2. TestBooleanMinShouldMatch.java
          10 kB
          Chris M. Hostetter
        3. TestBooleanMinShouldMatch.java
          13 kB
          Chris M. Hostetter
        4. TestBooleanMinShouldMatch.java
          11 kB
          Paul Elschot
        5. TestBooleanMinShouldMatch.java
          11 kB
          Chris M. Hostetter
        6. TestBooleanMinShouldMatch.java
          14 kB
          Yonik Seeley
        7. TestBoolean2Patch5.txt
          1 kB
          Paul Elschot
        8. LUCENE-395.patch
          5 kB
          Chris M. Hostetter
        9. LUCENE-395.patch
          5 kB
          Chris M. Hostetter
        10. LUCENE-395.patch
          6 kB
          Chris M. Hostetter
        11. BooleanScorer2.java
          13 kB
          Paul Elschot
        12. BooleanQuery.patch
          3 kB
          Yonik Seeley
        13. BooleanQuery.patch
          3 kB
          Yonik Seeley
        14. ASF.LICENSE.NOT.GRANTED--CustomQueryParserExample.java
          3 kB
          Mark Harwood
        15. ASF.LICENSE.NOT.GRANTED--CustomQueryParserExample.java
          4 kB
          Mark Harwood
        16. ASF.LICENSE.NOT.GRANTED--CoordConstrainedBooleanQuery.java
          2 kB
          Mark Harwood
        17. ASF.LICENSE.NOT.GRANTED--CoordConstrainedBooleanQuery.java
          5 kB
          Mark Harwood

        Issue Links

          Activity

            People

              yseeley@gmail.com Yonik Seeley
              markharw00d@yahoo.co.uk Mark Harwood
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: