lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4186) Lucene spatial's "distErrPct" is treated as a fraction, not a percent.
Date Wed, 25 Jul 2012 04:54:34 GMT


Chris Male commented on LUCENE-4186:

I think a couple of things:

- Specifying absolute distance values e.g 1m, brings up issues of units.  If we use the units
defined in the SpatialContext then it might not be clear what unit is currently configured
when a consumer sets one of these distance values.  But also having to specify the unit every
time sucks.  So I think if we're going to let users define absolute distances then we should
use a single standard unit (km or m, I don't mind) and let consumers / adapters do the conversion

- Absolute distances doesn't seem particularly useful when dealing with shapes of varying
sizes.  1m might make sense for a small shape but seems a little crazy for massive shapes.
 The nice thing about percentages is that they scaled well. 

- We should create a split between compulsory arguments and optional hints.  Anything compulsory
should be a constructor argument and anything optional should be done via a setter.  If what
you say is correct, that both of these are just knobs that can be turned but aren't compulsory,
then they should stay out of the constructor but we should provide setters.
> Lucene spatial's "distErrPct" is treated as a fraction, not a percent.
> ----------------------------------------------------------------------
>                 Key: LUCENE-4186
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Critical
>             Fix For: 4.0
> The distance-error-percent of a query shape in Lucene spatial is, in a nutshell, the
percent of the shape's area that is an error epsilon when considering search detail at its
edges.  The default is 2.5%, for reference.  However, as configured, it is read in as a fraction:
> {code:xml}
>     <fieldType name="location_2d_trie" class="solr.SpatialRecursivePrefixTreeFieldType"
>                distErrPct="0.025" maxDetailDist="0.001" />
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message