On Sun, Aug 24, 2014 at 2:29 AM, Bostic, Alex <alex.bos...@urs.com> wrote: > Ok updating my field type to the below, allowed me to index :-) HUGE THANKS > > <fieldType name="location_rpt" > class="solr.SpatialRecursivePrefixTreeFieldType" > spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" > geo="false" distErrPct="0.025" maxDistErr="0.000009" units="degrees" > worldBounds="ENVELOPE(-150281000,150281000,74670000,-57922000)" /> > > Two more questions: > Should I update maxDistErr?
Definitely, yes. The value you have there is based on a meter when geo=true. Apparently you are using a projection (geo=“false”), and you should pick a value corresponding to the maximum precision you want in your projected space. It appears that 7.5 is a meter, assuming the min & max X you have above represent the entire world (on earth). Maybe you can afford to be less precise, and save time on indexing. FYI you should check out my blog post related: http://www.opensourceconnections.com/blog/2014/04/11/indexing-polygons-in-lucene-with-accuracy/ > > Is it possible to use the SQL Server Geometry type and convert it to WKT in > the data-config file as shown below, or is there still an issue that I am not > seeing > > query="SELECT wt.Id, wt.Name, > wt.WorkTypeTypeId,wt.ChildId,wt.CreatedDate,wt.ModifiedDate,wt.Year, > wta.GEOM.STAsText(), wta.OBJECTID,wta.WTArea > FROM dbo.WorkTypes wt Inner Join dbo.WorkTypeAreas wta ON wt.Id = > wta.WorkTypeId"> > > wta.GEOM.STAsText() <- does not show in the index, is of type SQL Server > Geometry > > wta.WTArea <- does show in the index, is of type varchar(max) > > they are defined similarly in schema.xml > <field name="geom" type="location_rpt" indexed="true" stored="true"/> > > <field name="wtarea" type="location_rpt" indexed="true" stored="true" /> I don’t know… this is related to SQL Server and not Lucene/Solr. ~ David p.s. I’m going to FOSS4G next month. There are at least 2 talks about Lucene spatial.