lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4167) Remove the use of SpatialOperation
Date Thu, 28 Jun 2012 04:17:44 GMT


Chris Male commented on LUCENE-4167:

This is of course just one aspect of a Strategy's limitations, consider wether or not the
Strategy supports multi-value data or wether it supports indexing non-point shapes. Surely
that is quite relevant to a potential client. It seems very doubtful to me that the compile-time
type checks could be added for everything

Quite right and we can tackle these issues on a case by case basis.  Having a check like supportsMultiValued()
on Strategys seems like a good idea.  That way the user can consult this method before indexing.

And even with spatial operations – there are a lot of them to support, and wouldn't it be
twice as many for both makeXXXQuery & makeXXXFilter? I don't know where you would draw
the line. At least the current interface is fairly simple, and there is always Javadocs.

We don't have any useful Javadocs on this issue so I'm not going to rely on that.  I don't
see any issue with having a makeXXXQuery/Filter for each operation.  Strategys are essentially
factories so I think the ability to see at compile time what the factory can create is vitally
important.  If we get to 20 operations I'll start to worry.
> Remove the use of SpatialOperation
> ----------------------------------
>                 Key: LUCENE-4167
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/spatial
>            Reporter: Chris Male
>         Attachments: LUCENE-4167.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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message