lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrAdaptersForLuceneSpatial4" by DavidSmiley
Date Fri, 16 Nov 2012 03:47:34 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrAdaptersForLuceneSpatial4" page has been changed by DavidSmiley:
http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4?action=diff&rev1=19&rev2=20

Comment:
minor update

  <!> Solr4.0
- 
- Note: This page is a working draft of documentation.  It needs to be migrated/merged/moved/renamed
into the existing Solr [[SpatialSearch|spatial wiki content]] somehow.
  
  = Lucene / Solr 4 Spatial =
  
+ This document describes how to use the ''new'' spatial field types and related functionality
in Lucene / Solr 4.  The [[SpatialSearch|existing spatial support]] introduced in Solr 3 is
still present and is still the default used in Solr's example schema via the named "location"
field type.
+ 
- This document describes how to use the new spatial functionality in Lucene / Solr 4.  The
bulk of the implementation lives in the new Lucene 4 spatial module.  It replaces the former
"Lucene spatial contrib" in v3.  The Solr piece is small as it only needs to provide field
types which are essentially adapters to the code in the Lucene spatial module.  The shape
implementations and other core spatial code that isn't related to Lucene is held in a new
open-source project called [[https://github.com/spatial4j/spatial4j|Spatial4j]].  Presently,
polygon support requires an additional dependency -- [[http://sourceforge.net/projects/jts-topo-suite/|JTS]].
+ The bulk of the new spatial implementation lives in the new Lucene 4 spatial module.  It
replaces the former "Lucene spatial contrib" in v3.  The Solr piece is small as it only needs
to provide field types which are essentially adapters to the code in the Lucene spatial module.
 The shape implementations and other core spatial code that isn't related to Lucene is held
in a new open-source project called [[https://github.com/spatial4j/spatial4j|Spatial4j]].
 Presently, polygon support requires an additional dependency -- [[http://sourceforge.net/projects/jts-topo-suite/|JTS]].
  
  There is a basic [[https://github.com/ryantxu/spatial-solr-sandbox|demo application]] that
exercises a variety of these features.  It's not "live" so you'll have to download and build
it first.  It's a bit rough around the edges as it's mostly used by the Lucene spatial developers.
  
@@ -90, +90 @@

  
  {{{	 <field name="geo">POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30))</field>
}}}
  
- In WKT, coordinates are in "x y" (lon lat) order, and the coordinates are each separated
by commas.
+ In WKT, coordinates are in "x y" (lon lat) order, and the coordinates are each separated
by commas.  ''(The double parenthesis is not a typo; see the WKT spec.)''
  
  == JTS / WKT / Polygon notes ==
  
- Shapes other than point, circle, or rectangle require JTS, an otherwise optional dependency.
 If you want to use WKT but only need the basic shapes, you still need JTS -- a restriction
likely to be addressed in the near future.
+ Shapes other than point, circle, or rectangle require [[http://sourceforge.net/projects/jts-topo-suite/|JTS]],
an otherwise optional dependency.  If you want to use [[http://en.wikipedia.org/wiki/Well-known_text|Well
Known Text]] (WKT) but only need the basic shapes, you still need JTS -- a restriction likely
to be addressed in the near future.
  
   * Due to a combination of things, JTS can't simply be referenced by a "<lib>" entry
in solrconfig.xml; it needs to be in WEB-INF/lib in Solr's war file, basically.
   * JTS views the world as a flat plane; the latitude and longitude are mapped to this plane
directly.  It uses Euclidean math operations, not Geodesic ones.  This effectively warps shapes
slightly, although it can be a bit much if the vertices are particularly far apart longitudinally.

Mime
View raw message