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

TwoDoublesStrategy is broken for Circles

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 4.0-ALPHA, 6.0
    • modules/spatial
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: