[ 
https://issues.apache.org/jira/browse/LUCENE-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421495#comment-13421495
 ] 

David Smiley commented on LUCENE-4186:
--------------------------------------

I'd like to look at the bigger picture with distance error.  I think there are 
two things a user might want to specify:
# What is the maximum distance detail the index should use for its calculations 
on this field.  In geospatial contexts, this might be 1 meter.  As applied to 
geohash prefix tree based Strategies this would result in using a particular 
maxLevels (geohash length) for the tree of about 10.
# What is the maximum error distance for a particular shape that I am indexing 
or querying by?  It is bounded by the previous statistic.  I might want to 
specify this in real distance terms (e.g. 1 meter) or have it be some fraction 
or percentage tied to the shape's size, which makes a nice default.

These end up being hints / constraints; a Strategy will very likely use more 
precision but should have at least as much precision as is asked for.  Sound 
good?  If so...

So would SpatialStrategy then have a setMaxDetailDist() and 
setDefaultDistErrPct() (for index & query shapes) ?  The problem with 
setMaxDetailDist is that, as a setter, it's done after the Strategy's 
construction; we don't have an init() method.  It could become another 
constructor argument, the 3rd:  SpatialStrategy(SpatialContext ctx, String 
fieldName, maxDetailDist) or maybe don't worry about it -- add a 
getMaxDetailDist() that returns the actual maximum detail distance, and let 
initialization be up to the specific Strategy. I guess I like that best.  
setDefaultDistErrPct() could be a simple setter with getter.  Supplying 0 
implies maximum detail allowed by maxDetailDist.
                
> Lucene spatial's "distErrPct" is treated as a fraction, not a percent.
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-4186
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4186
>             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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to