You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Chris Male (JIRA)" <ji...@apache.org> on 2012/06/27 13:20:42 UTC
[jira] [Created] (LUCENE-4166) TwoDoublesStrategy is broken for
Circles
Chris Male created LUCENE-4166:
----------------------------------
Summary: TwoDoublesStrategy is broken for Circles
Key: LUCENE-4166
URL: https://issues.apache.org/jira/browse/LUCENE-4166
Project: Lucene - Java
Issue Type: Bug
Components: modules/spatial
Reporter: Chris Male
Priority: Critical
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():
{code}
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;
{code}
I think instead the code which handles Circles should ask for the bounding box of the Shape and uses that instead.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4166) TwoDoublesStrategy is broken for
Circles
Posted by "Chris Male (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male updated LUCENE-4166:
-------------------------------
Attachment: LUCENE-4166.patch
Simple patch extending runtime type checking to Circle and using the Shape bounding box.
> TwoDoublesStrategy is broken for Circles
> ----------------------------------------
>
> Key: LUCENE-4166
> URL: https://issues.apache.org/jira/browse/LUCENE-4166
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/spatial
> Reporter: Chris Male
> Priority: Critical
> Attachments: LUCENE-4166.patch
>
>
> 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():
> {code}
> 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;
> {code}
> I think instead the code which handles Circles should ask for the bounding box of the Shape and uses that instead.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-4166) TwoDoublesStrategy is broken for
Circles
Posted by "Chris Male (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Male resolved LUCENE-4166.
--------------------------------
Resolution: Fixed
Fix Version/s: 5.0
4.0
Assignee: Chris Male
Fixed, but we really need to look at this Strategy closely in another issue.
> TwoDoublesStrategy is broken for Circles
> ----------------------------------------
>
> Key: LUCENE-4166
> URL: https://issues.apache.org/jira/browse/LUCENE-4166
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/spatial
> Reporter: Chris Male
> Assignee: Chris Male
> Priority: Critical
> Fix For: 4.0, 5.0
>
> Attachments: LUCENE-4166.patch
>
>
> 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():
> {code}
> 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;
> {code}
> I think instead the code which handles Circles should ask for the bounding box of the Shape and uses that instead.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org