[ https://issues.apache.org/jira/browse/LUCENE-4186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448784#comment-13448784 ]
David Smiley commented on LUCENE-4186: -------------------------------------- bq. +1 Do we validate somewhere that the values are between 0 and 0.5? Yes. bq. If I understand correctly, your motivation for doing this is so in the default scenario (when no pct is defined) you have the same value at both index time and query time, correct? Yes. bq. I'm starting to wonder whether it makes sense to allow the value to be set per request. Having the same value at both index and query time seems ideal so perhaps we should force the value, whether it be the pct or absolute value, be provided at construction of the Strategy. IMO it's quite useful to have the request specifically indicate either distErrPct or distErr directly. I think it would be completely unworkable to have no query-time override and fix the percentage on the strategy. It'd be nice if this could be done at index time too but I'm not sure how it would fit into the API. Maybe an overloaded createIndexableFields(shape,distErr)? bq. So can the user now provide either the the distErr or distErrPct and if they provide the later, it is converted to the former seamlessly? Or must the user do the conversion themselves? I'm +1 for the first option. Yeah, it's seamlessly converted when the strategy calls args.resolveDistErr(...). The user definitely does not do any conversion themselves. > 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 > > Attachments: LUCENE-4186_distErrPct_upgrade.patch > > > 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 For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org