Hi, I'm a bit of a solr beginner. I have installed Solr 4.0 and I'm trying to index some spatial data stored in a sql server instance. I'm using the DataImportHandler here is my data-comfig.xml:
<dataConfig> <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost\sqlserver08;databaseName=Spatial" user="sa" password="sqlserver08"/> <document> <entity name="poi" query="select OBJECTID,CATEGORY,NAME,POINT_X,POINT_Y from NZ_POI"> <field column="OBJECTID" name="id"/> <field column="CATEGORY" name="category"/> <field column="NAME" name="name"/> <field column="POINT_X" name="lat"/> <field column="POINT_Y" name="lon"/> </entity> </document> </dataConfig> In my schema file I have following definition: <field name="category" type="string" indexed="true" stored="true"/> <field name="name" type="string" indexed="true" stored="true"/> <field name="lat" type="tdouble" indexed="true" stored="true"/> <field name="lon" type="tdouble" indexed="true" stored="true"/> <copyField source="category" dest="text"/> <copyField source="name" dest="text"/> I have completed a data import with no errors in the log as far as i can tell. However when i inspect the schema i do not see the columns names lat\lon. When sending the query: http://localhost:8080/Solr/select/?q=Camp AND _val_:"recip(dist(2, lon, lat, 44.794, -93.2696), 1, 1, 0)"^100 I get an error undefined column. Does anybody have any ideas about whether the above is the correct procedure for indexing spatial data? Cheers S -- View this message in context: http://lucene.472066.n3.nabble.com/Indexing-spatial-columns-tp2318493p2318493.html Sent from the Solr - User mailing list archive at Nabble.com.