lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4167) Remove the use of SpatialOperation
Date Wed, 27 Jun 2012 22:02:44 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402591#comment-13402591
] 

David Smiley commented on LUCENE-4167:
--------------------------------------

bq. I can see the need for different behaviour for different Shape relationships to. But I
think we should perhaps do that using method specialization. We already have the PrefixTreeStrategy
abstraction, so you could write a WithinRecursivePrefixTreeStrategy which specialized makeQuery
differently. That way it is clear to the user what the Strategy does, we won't need the runtime
checks and we won't have Strategys like TwoDoubles which has methods for each of the different
behaviours in the same class.

Sorry, but I disagree with your point of view.  The Strategy is supposed to be a single facade
to the implementation details of how a query will work, including the various possible spatial
predicates (i.e. spatial operations) that is supports.  If one Java class file shows that
it becomes too complicated and it would be better separated because implementing different
predicates are just so fundamentally different, then then the operations could be decomposed
to separate source files but it would be behind the facade of the Strategy.  I don't believe
that TwoDoublesStrategy demonstrates complexity of a class trying to do too many things. 
I absolutely think TwoDoublesStrategy could be coded to be more clear.  If it is as buggy/untested
as I think it is and nobody wants to fix it (I don't), personally I think this strategy can
go away.
                
> Remove the use of SpatialOperation
> ----------------------------------
>
>                 Key: LUCENE-4167
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4167
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/spatial
>            Reporter: Chris Male
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message