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-4373) BBoxStrategy should support query shapes of any type
Date Wed, 12 Sep 2012 14:43:07 GMT

    [ 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


Mime
View raw message