The underling index format is unchanged between SOLR-2155 and Solr 4 provided that this is only about indexing points, and SOLR-2155 could only index points any way. To really ensure it's drop-in compatible, specify maxLevels=12 *instead of* setting maxDistErr (which indirectly derives a maxLevels) so you can be sure the levels are the same.
Also, SOLR-2155 always did full query shape precision (to as much as the maxLevels indexed length allows of course). By default, SpatialRecursivePrefixTreeFieldType uses 2.5% of the query shape radius as its accuracy, which buys a little more performance at the expense of accuracy. You can set distErrPct="0" if you require full precision. For example you might need a meter of indexed precision for the case when someone zooms in really low to some small region, but if the search is a huge area of an entire country or state, then do you truly need a meter precision along the edge for that case too? I think not. distErrPct is relative to the overall size of the query shape. The default I think is probably fine but people have observed its inaccuracy, particularly when a point is plotted outside a drawn query box and thought it was a problem with the spatial code when it's actually a configuration default. 0 is actually quite scalable provided there isn't a ton of indexed data coinciding with the query shape edge along the query shape's entire edge. I'd be interested to hear if the Solr 4 version is faster/slower if you have any benchmarks -- especially v4.2 due out soon, but earlier 4.x should be nearly the same. It's weird that you're seeing the stored value coming back in search results as a geohash. In Solr 4 you get precisely what you added. ~ David Harley wrote > Hi David Smiley: > We use a 3rd party software to load Solr 3.4 so the behavior needs to be > transparent with the migration to 4.1, but I was expecting that I would > need to rebuild the solr database. > > I moved/added the old solr 3.4 core to solr 4.1, with only minor > modification (commented out the old spatial type and add the new) and I > was surprised I was able to query the data. > > The geohash is displaying as a hash, and not coordinate, so I am checking > my configuration on the geospatial class. > > > > > > Harley Powers Parks, GISP > Booz | Allen | Hamilton > Geospatial Visualization Web Developer > > WEB: https://www.apan.org > > USPACOM J73/APAN > Pacific Warfighting Center Ford Island > > p: 808.472.7752 > c: 808.377.0632 > apan: > harley.parks@ > nipr: > harley.parks.ctr@ > > CONTRACTOR: > Booz | Allen | Hamilton > e: > parks_harley@ > > > > -----Original Message----- > From: David Smiley (@MITRE.org) [mailto: > DSMILEY@ > ] > Sent: Wednesday, March 06, 2013 9:34 PM > To: > solr-user@.apache > Subject: Re: Migrate Solr 3.4 w/ solr-1255 GeoHash to Solr 4 > > Hi Harley, > > See: http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4 > In SOLR-2155 you had to explicitly specify the prefix encoding length, > whereas in Solr 4 you specify how much precision you need and it figures > out what the length is that satisfies that. When you first use the field, > it'll log what the derived levels figure is (if you care). The units are > decimal degrees (0-180 from no distance to reverse side of the globe -- > aka latitudinal degrees). > > You can name the field type whatever you want, but I don't recommend > "geohash" because this conflates it with an actual GeoHashField, and also > it's more of an internal detail. > > You said you're having trouble with the migration... but what is the > trouble? > > ~ David > > > Harley wrote >> I'm having trouble migrating the geohash fields from my Solr 3.4 >> schema to the Solr 4 schema. >> >> this is the 3.4 type and class: >> > <fieldType name="geohash" class="solr2155.solr.schema.GeoHashField" >> > length="12"/> >> is the below Solr 4 spatial type the right configuration to implement >> data being stored in fields once using the "geohash" type and class in >> the above solr 3.4 field type? >> > <fieldType name="geohash" >> > class="solr.SpatialRecursivePrefixTreeFieldType" >> geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" >> prefixTree="geohash" /> >> is the units="degrees" degree decimal? example: 21.0345 >> >> >> >> Harley Powers Parks, GISP > > > > > > ----- > Author: > http://www.packtpub.com/apache-solr-3-enterprise-search-server/book > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Migrate-Solr-3-4-w-solr-1255-GeoHash-to-Solr-4-tp4045416p4045470.html > Sent from the Solr - User mailing list archive at Nabble.com. ----- Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book -- View this message in context: http://lucene.472066.n3.nabble.com/Migrate-Solr-3-4-w-solr-1255-GeoHash-to-Solr-4-tp4045416p4045835.html Sent from the Solr - User mailing list archive at Nabble.com.