This module adds support for indexing and filtering by geospatial areas when using Search API Location with Search API Solr Search.

Internally, it uses Solr's BBoxField field type, introduced in Solr 4.10. However, due to a bug in Solr, for versions lower than 4.10.3 you have to apply a custom fix to the included schema_extra_fields.xml file, detailed in the file itself.



Copy the two XML filed contained in the module to your Solr server's conf/ directory. (If you had custom modifications to those file, you'll have to merge them manually instead.) Then restart your Solr server.

After enabling the module, you'll then be able to index WKT data in your search index – e.g., a Geofield's "Well-known text" property – as "Location area (WKT)". Then, in views on that search index, you get a filter on the field which lets you input an area with any available Geofield widget to filter the results by (when the filter is exposed), also according to a configurable operator.

Supporting organizations: 
Funded the development of this module.

Project information