You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2012/09/12 16:43:07 UTC
[jira] [Commented] (LUCENE-4373) BBoxStrategy should support query
shapes of any type
[ https://issues.apache.org/jira/browse/LUCENE-4373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454036#comment-13454036 ]
David Smiley commented on LUCENE-4373:
--------------------------------------
As part of this, I think a makeValueSource() might be modified to alter the area similarity to consider the query shape's percentage of the bbox that it fills. Perhaps something like this:
{code:java}
public ValueSource makeValueSource(SpatialArgs args) {
Shape shape = args.getShape();
double queryPowerFactor = 1;
if (!(shape instanceof Rectangle)) {
double queryBBoxArea = shape.getBoundingBox().getArea(ctx);
double queryArea = shape.getArea(ctx);
if (queryBBoxArea != 0)
queryPowerFactor = queryArea / queryBBoxArea;
}
return new BBoxSimilarityValueSource(
this, new AreaSimilarity(shape.getBoundingBox(), queryPower * queryPowerFactor, targetPower));
}
{code}
> BBoxStrategy should support query shapes of any type
> ----------------------------------------------------
>
> Key: LUCENE-4373
> URL: https://issues.apache.org/jira/browse/LUCENE-4373
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial
> Reporter: David Smiley
> Priority: Minor
>
> It's great that BBoxStrategy has sophisticated shape area similarity based on bounding box, but I think that doesn't have to preclude having a non-rectangular query shape. The bbox to bbox query implemented already is probably pretty pretty fast as can work by numeric range queries, but I'd like this to be the first stage of which the 2nd is a FieldCache based comparison to the query shape if it's not a rectangle.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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