lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david.w.smiley@gmail.com" <david.w.smi...@gmail.com>
Subject Re: Using Solr's spatial functionality for astronomical catalog
Date Thu, 21 Jan 2016 02:34:26 GMT
Hello Colin,

If the spatial field you use is the SpatialRecursivePrefixTreeFieldType one
(RPT for short) with geo="true" then the circle shape (i.e. point-radius
filter) implied by the geofilt Solr QParser is on a sphere.  That is, it
uses the "great circle" distance computed using the Haversine formula by
default, though it can be configured to use the Law of Cosines formula or
Vincenty (spherical version) formula if you so choose.  Using geodist() for
spatial distance sorting/boosting also uses this.  If you use LatLonType
then geofilt & geodist() use Haversine too.

If you use polygons or line strings, then it's *not* using a spherical
model; it's using a Euclidean (flat) model on plate carrée.  I am currently
working on adapting the Spatial4j library to work with Lucene's Geo3D (aka
spatial 3d) which has both a spherical model and an ellipsoidal model,
which can be configured with the characteristics specified by WGS84.  If
you are super-eager to get this yourself without waiting, then you could
write a Solr QParser that constructs a Geo3dShape wrapping a Geo3D GeoShape
object constructed from query parameters.  You might alternatively try and
use Geo3DPointField on Lucene 6 trunk.

~ David

On Tue, Jan 19, 2016 at 11:07 AM Colin Freas <cfreas@stsci.edu> wrote:

>
> Greetings!
>
> I have recently stood up an instance of Solr, indexing a catalog of about
> 100M records representing points on the celestial sphere.  All of the
> fields are strings, floats, and non-spatial types.  I’d like to convert the
> positional data to an appropriate spatial point data type supported by Solr.
>
> I have a couple of questions about indexing spatial data using Solr, since
> it seems spatial4j, and the spatial functionality in Solr generally, is
> more GIS geared.  I worry that the measurements of lat/long on the
> imperfect sphere of the Earth wouldn’t match up with the astronomical right
> ascension/declination concept of the perfectly spherical celestial sphere
> used to record the coordinates of our records.
>
> I’m also worried there might be other assumptions built into spatial4j &
> Solr based on using a real surface vs a virtual one.
>
> Does anyone have experience doing this, or is there perhaps some
> documentation specific to this use case that anyone might be able to point
> me to?
>
> Thanks in advance,
> Colin
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message