lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pires, Guilherme" <>
Subject RE: Indexing and Querying MS SQL Server 2012 Spatial
Date Wed, 20 Aug 2014 20:29:56 GMT

I've been working with Solr together with JTS and use location_rpt class for the geometry
field for a while now. (However, I must say that the index grew a lot when used this class
instead of the geohash for simple points use it only if you really need to index polylines
and/or polygons)

I actually already successfully connected solr to postGis and oracle spatial via DIH but in
this live website ( ) we had a GE Smallworld as the GIS system so it
was easier just to build a sync engine that periodically queries differences from the GIS
and push them into solr via xml document. This project has already couple of years now so
a lot would be different now.

In that website, solr provides, obviously, all the text search on the top and also 70% of
the themes available on the treeview on the left (expand in the red button) that are result
of a bounding box query to geometry index in solr. 
Something like this : (...)q=bounds:Intersects(-9.463118366688718 38.67913579372146 -9.370549969166746

After this, we actually provided for a different project, a similar sync mechanism but between
in-house solr instances and google maps engine datastore in the cloud and it works like a

Guilherme Pires
Geospatial Intelligence @ CGI

De: []
Enviado: quarta-feira, 20 de Agosto de 2014 18:49
Assunto: Re: Indexing and Querying MS SQL Server 2012 Spatial

Hi Alex,

I guess a spatial tutorial might be helpful, but there isn’t one.  There is
a sample at the Lucene-spatial layer but not up at Solr.  You need to use
WKT syntax for line’s and polys, and you may do so as well for other
shapes.  And in the schema use location_rpt copied from Solr’s example
schema for starters, but modified as the ref guide & wiki show to use JTS.
 The ref guide, wiki, and I would guess that book should show how to to a
bounding box query using {!bbox} — it’s pretty simple.

~ David Smiley
Freelance Apache Lucene/Solr Search Consultant/Developer

On Tue, Aug 19, 2014 at 11:25 AM, Bostic, Alex <> wrote:

> Hello I'm new to Solr:
> I have a SQL Server 2012 database with spatial columns (points/lines/polys)
> Do you have any resources to point to for the following
> Creating a Solr index of a sql server spatial table
> Bounding Box query (intersect) example, possibly with front-end from GMaps
> or OpenLayers
>  I'm currently reading Apache Solr Beginner's Guide and have reviewed
> I am able to index and query my non spatial data, I am just looking for
> some resource that may have some more detail about how to set everything up.
> I can provide more detail if needed.
> Thanks
> Alex Bostic
> GIS Developer
> URS Corporation
> 12420 Milestone Center Drive, Suite 150
> Germantown, MD 20876
> direct line: 301-820-3287
> cell line: 301-213-2639
> This e-mail and any attachments contain URS Corporation confidential
> information that may be proprietary or privileged. If you receive this
> message in error or are not the intended recipient, you should not retain,
> distribute, disclose or use any of this information and you should destroy
> the e-mail and any attachments or copies.

View raw message