[
https://issues.apache.org/jira/browse/LUCENE-4167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421987#comment-13421987
]
Chris Male commented on LUCENE-4167:
------------------------------------
I think somewhere along the lines we lost track of the original purpose of this
issue, removing SpatialOperation. Originally I strongly pushed to remove
SpatialOperation and use strongly typed methods. But after considering that a
little and dabbling in adding operations to some Strategies, I'm unsure how
effective it would be.
Requiring an interface per operation seems heavy handed since inevitably the
consumer will interact with a Strategy instance, not a ContainsXYZ instance.
Equally, having a makeXYZFilter method for each operation in Strategy would
seem to simply move the problem rather than address it since many Strategies
won't be implementing all the operations (meaning they'll have to throw an UOE)
while other Strategies will be implementing many operations.
As such I withdraw my interest in removing SpatialOperation and instead think
we need to focus on documentation to make it clear to consumers which
Strategies fit their needs. I'll extract some of the other improvements
discussed here and spin them off as issues.
> Remove the use of SpatialOperation
> ----------------------------------
>
> Key: LUCENE-4167
> URL: https://issues.apache.org/jira/browse/LUCENE-4167
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/spatial
> Reporter: Chris Male
> Attachments: LUCENE-4167.patch,
> LUCENE-4167_migrate_com_spatial4j_core_query_to_Lucene_spatial.patch,
> LUCENE-4167_migrate_com_spatial4j_core_query_to_Lucene_spatial.patch
>
>
> Looking at the code in TwoDoublesStrategy I noticed
> SpatialOperations.BBoxWithin vs isWithin which confused me. Looking over the
> other Strategys I see that really only isWithin and Intersects is supported.
> Only TwoDoublesStrategy supports IsDisjointTo. The remainder of
> SpatialOperations are not supported.
> I don't think we should use SpatialOperation as this stage since it is not
> clear what Operations are supported by what Strategys, many Operations are
> not supported, and the code for handling the Operations is usually the same.
> We can spin off the code for TwoDoublesStrategy's IsDisjointTo support into a
> different Strategy.
--
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: [email protected]
For additional commands, e-mail: [email protected]