lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4373) BBoxStrategy should support query shapes of any type
Date Wed, 12 Sep 2012 14:43:07 GMT


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
  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));

> BBoxStrategy should support query shapes of any type
> ----------------------------------------------------
>                 Key: LUCENE-4373
>                 URL:
>             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:

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

View raw message