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

TwoDoublesStrategy is broken for Circles

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA, 6.0
    • Component/s: modules/spatial
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      TwoDoublesStrategy supports finding Documents that are within a Circle, yet it is impossible to provide one due to the following code found at the start of TwoDoublesStrategy.makeQuery():

      Shape shape = args.getShape();
          if (!(shape instanceof Rectangle)) {
            throw new InvalidShapeException("A rectangle is the only supported shape (so far), not "+shape.getClass());//TODO
          }
          Rectangle bbox = (Rectangle) shape;
      

      I think instead the code which handles Circles should ask for the bounding box of the Shape and uses that instead.

        Attachments

        1. LUCENE-4166.patch
          3 kB
          Chris Male

          Activity

            People

            • Assignee:
              cmale Chris Male
              Reporter:
              cmale Chris Male
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: