lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6578) Geo3d: arcDistanceToShape() method may be useful
Date Thu, 25 Jun 2015 07:52:05 GMT


Karl Wright commented on LUCENE-6578:

bq. For example I see the same method with method calls changed from "normalDistance" to "normalDistanceSquared"
but otherwise appears identical. Can you please think of a way to approach this with less
repetition and thus more maintainability?

The whole purpose of having multiple distance metrics is performance.  These computations
are expected to be used at document scoring time.  Saving even a single expensive sqrt is
important in that context, which is why the implementations look as they do.

Object creation for the purposes of reducing code "duplication according to pattern" is also
a bad idea for the same reason.  Object creation would be required for any kind of more complete
code-sharing approach.

Mapping the xxx(GeoPoint pt) to xxx(x,y,z), though, is something doable and I will look into
it.  I will also remove the javadoc, although I find it odd that that would be considered
important for Lucene.

> Geo3d: arcDistanceToShape() method may be useful
> ------------------------------------------------
>                 Key: LUCENE-6578
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial
>            Reporter: Karl Wright
>         Attachments: LUCENE-6578.patch
> I've got an application that seems like it may need the ability to compute a new kind
of arc distance, from a GeoPoint to the nearest edge/point of a GeoShape.  Adding this method
to the interface, and corresponding implementations, would increase the utility of the package
for ranking purposes.

This message was sent by Atlassian JIRA

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

View raw message