(This is one of those messages that I would have responded to at the time if I 
only noticed it.)

There is not yet indexing of arbitrary shapes (i.e. your data can only be 
points), but with SOLR-2155 you can query via WKT thanks to JTS.  If you want 
to index shapes then you'll have to wait a month or two for work that is 
underway right now.  It's coming; be patient.

I don't see the LGPL licensing as a problem; it's *L*GPL, not GPL, after all.  
In SOLR-2155 the patch I take measures to download this library dynamically at 
build time and compile against it.  JTS need not ship with Solr; the user can 
get it themselves if they want this capability.  Non-JTS query shapes should 
work without the presence of JTS.

~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server/

On Feb 8, 2011, at 11:18 PM, Adam Estrada wrote:

> I just came across a ~nudge post over in the SIS list on what the status is 
> for that project. This got me looking more in to spatial mods with Solr4.0.  
> I found this enhancement in Jira. 
> https://issues.apache.org/jira/browse/SOLR-2155. In this issue, David 
> mentions that he's already integrated JTS in to Solr4.0 for querying on 
> polygons stored as WKT. 
> 
> It's relatively easy to get WKT strings in to Solr but does the Field type 
> exist yet? Is there a patch or something that I can test out? 
> 
> Here's how I would do it using GDAL/OGR and the already existing csv update 
> handler. http://www.gdal.org/ogr/drv_csv.html
> 
> ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_WKT
> This converts a shapefile to a csv with the geometries in tact in the form of 
> WKT. You can then get the data in to Solr by running the following command.
> curl 
> "http://localhost:8983/solr/update/csv?commit=true&separator=%2C&fieldnames=id,attr1,attr2,attr3,geom&stream.file=C:\tmp\output.csv&overwrite=true&stream.contentType=text/plain;charset=utf-8";
> There are lots of flavors of geometries so I suspect that this will be a 
> daunting task but because JTS recognizes each geometry type it should be 
> possible to work with them. 
> Does anyone know of a patch or even when this functionality might be included 
> in to Solr4.0? I need to query for polygons ;-)
> Thanks,
> Adam

Reply via email to