Features of spatial search
With Solr, we can combine location-based data with normal text data in our index. This is termed spatial search or geospatial search.
Earlier versions of Solr (Solr 3.x) provided the following features for spatial search:
- Representation of spatial data as latitude and longitude in Solr
- Filtering by
geofilt
and bound box filters - Use of the
geodist
function to calculate distance - Distance-based faceting and boosting of results
With Solr 4, the following new features have been introduced in Solr:
- Support for new shapes: Polygon, LineString, and other new shapes are supported as indexed and query shapes in Solr 4. Shapes other than points, rectangles, and circles are supported via the Java Topology Suite (JTS), an optional dependency that we will discuss later.
- Indexing multi-valued fields: This is critical for storing the results of automatic place extraction from text using natural language processing techniques, since a variable number of locations will be found for a...