lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "SpatialSearch" by YonikSeeley
Date Thu, 10 Mar 2011 18:21:19 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SpatialSearch" page has been changed by YonikSeeley.


   . [[http://localhost:8983/solr/select?&q=*:*&sfield=store&pt=45.15,-93.85&facet.query={!frange%20l=0%20u=5}geodist%28%29&facet.query={!frange%20l=5.001%20u=3000}geodist%28%29&wt=xml&facet=true|&q=*:*&sfield=store&pt=45.15,-93.85&facet.query={!frange
l=0 u=5}geodist()&facet.query={!frange l=5.001 u=3000}geodist()]]
  == How to boost closest results (with dismax) ==
- It is possible also boost the query by closest results by combining bq with geodist():
+ It is possible also boost the query by closest results by combining bf with geodist():
   . [[http://localhost:8983/solr/select?fl=name,store,score&defType=dismax&q.alt=*:*&fq={!geofilt}&sfield=store&pt=45.15,-93.85&d=50&bf=recip(geodist(),2,200,20)&sort=score%20desc|...&defType=dismax&q.alt=*:*&fq={!geofilt}&sfield=store&pt=45.15,-93.85&d=50&bf=recip(geodist(),2,200,20)&sort=score
- = Advanced Spatial Options - Under Development =
- ?SpatialSearchDev -- Covers things like Geohash (supports multivalue lat-lon points), North/South
Pole issues, other distance functions, etc. 
+ = Advanced Spatial Search =
+ Solr also supports other spatial capabilities beyond just latitude and longitude. For example,
a !PointType can be used to represent a point in an n-dimensional space. This can be useful,
for instance, for searching in CAD drawings or blueprints. Solr also supports other distance
measures. See the FunctionQuery page for more information and look for hsin, ghhsin and others.
+ == LatLonType ==
+ The !LatLonType is the current default spatial field.  Values for this type are of the form
+ although the scenes, the lattitude and longitude are indexed as separate numbers.
+ Fields using !LatLonType must be single valued (i.e. multiValued="false").  This field type
does distance calculations based on Great Circle (haversine).
+ In addition to {{{geofilt}}}, {{{geodist}}} and {{{bbox}}}, the !LatLonType supports field
queries such as {{{field:10,20}}} and range queries such as {{{field:[10,20 TO 30,40]}}}.
+ === Filtering Caveats ===
+ For the {{{bbox}}} filter, when the bounding box includes a pole, the !LatLonType will switch
from producing a bounding box to a "bounding bowl" (i.e. a [[|spherical
cap]]) whereby it will include all values that are North or South of the  latitude of the
would be bounding box (the lower left and the upper  right) that is closer to the equator.
 In other words, we still  calculate what the coordinates of the upper right corner and the
lower  left corner of the box would be just as in all other filtering cases,  but we then
take the corner that is closest to the equator (since it  goes over the pole it may not be
the lower left, despite the name) and  do a latitude only filter.  Obviously, this means there
will be more  matches than a pure bounding box match, but the query is much easier to  construct
and will likely be faster, too.
+ = Spatial Options Under Development =
+ SpatialSearchDev -- Covers things like Geohash (supports multivalue lat-lon points), other
distance functions, etc. 

View raw message