Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "SolrAdaptersForLuceneSpatial4" page has been changed by DavidSmiley: http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4?action=diff&rev1=16&rev2=17 Comment: Add distErr option to query shape == Search == - Searching with the new spatial module is used significantly different than Solr 3 spatial. Here is a Solr filter query parameter for a lat-lon bounding box using the simple shape syntax (non-WKT): + Searching with the new spatial module is done significantly different than Solr 3 spatial. Here is a Solr filter query parameter for a lat-lon bounding box using the simple shape syntax (non-WKT): {{{ fq=geo:"Intersects(-74.093 41.042 -69.347 44.558)" }}} - Notice that the query uses the standard default Lucene query parser and uses its fielded-query syntax in which a field is referenced followed by a colon. The spatial operation and shape are provided in the double-quotes. Just use Intersects operation for now, as the other's aren't well supported. The contents of the parenthesis are a shape in the very same format used when indexing. + Notice that the query uses the standard default Lucene query parser and uses its fielded-query syntax in which a field is referenced followed by a colon. The spatial operation and shape are provided in the double-quotes. Just use Intersects operation for now, as the others aren't well supported. The contents of the parenthesis are a shape in the very same format used when indexing. - Keep in mind that the query shape will by default have a non-zero precision of 0.025 (2.5%), calculated in the same way that distErrPct is on the field type declaration. Here is an example polygon query setting it to 0: + Keep in mind that the query shape will by default have the distErrPct precision specified by the field type definition, which defaults to 0.025 (2.5%). Interpretation of this figure was described earlier. Here is an example polygon query setting it to 0: {{{ fq=geo:"Intersects(POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30))) distErrPct=0" }}} + + By setting it to 0, it is as accurate as the grid is (maxDistErr). You can also specify distErr=... to explicitly set the precision for the shape for when you know what the accuracy should be. == Sorting and Relevancy == @@ -133, +135 @@ {{{ http://localhost:8983/solr/select?q=*:*&sort=query($sortsq)+asc&wt=xml&fl=distmi:mul(query($sortsq),68.9722),distkm:mul(query($sortsq),111),distdeg:query($sortsq),store_geohash&fq={!%20v=$geoq}&sortsq={!%20score=distance%20v=$geoq}&geoq=store_geohash:"Intersects(Circle(37.489651,-77.665085 d=.144985951))" }}} + === Returning The Distance in Search Results === + + TODO +