[
https://issues.apache.org/jira/browse/LUCENE-4173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413733#comment-13413733
]
Chris Male commented on LUCENE-4173:
------------------------------------
I do quite like this idea.
Couple of thoughts:
- What would a user do with this information? If canIndex() returns false, so
what? I can't see a situation where an API consumer would then cycle through
alternative Strategys. Is the idea to push the decision about whether to
ignore or to throw an Exception, to the consumer? I kind of like that. Except
we're still going to have to either ignore or throw an Exception in
createIndexFields() if the Strategy is given a bad Shape and I still believe
ignoring is the bad choice.
- Why limit this to indexing? Surely the same applies to filtering too. I
don't really like the idea of a CONTAINS op when given a Point so I'm presented
with the same issue, either ignore the Shape or throw an Exception.
- Why allow Strategys to ignore Shapes at all? The Shape interface provides two
fallback options when indexing or filtering. You can either use the Shape's
bounding box or its centre point. No they might not be ideal, but if a
Strategy can only support Rectangles or Points, then it can still index a
Shape. We can then document that Strategys *must* index or filter any Shape,
but can degrade if necessary.
> Remove IgnoreIncompatibleGeometry for SpatialStrategys
> ------------------------------------------------------
>
> Key: LUCENE-4173
> URL: https://issues.apache.org/jira/browse/LUCENE-4173
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/spatial
> Reporter: Chris Male
> Attachments: LUCENE-4173.patch
>
>
> Silently not indexing anything for a Shape is not okay. Users should get an
> Exception and then they can decide how to proceed.
--
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]