Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module extends Search API Solr to index and query geographical shapes beyond simple latitude/longitude points. It allows searching for points contained within indexed polygons and modifies Solr's schema for spatial data.

This module is based on search_api_location feature request to allow indexing
polygons -> https://www.drupal.org/project/search_api_location/issues/3113266 So may change if patch is accepted. But meanwhile...

These are the features included in module:

  • Override of the rpt datatype that restricts the solr indexing to lat,lon
    to allow indexing shapes. There's a subscription to datatypes event
    dispatched by search_api to overwrite the RPT datatype Class with the
    class provided by this module that is not filtering to lat,lon pair
    and allow more shapes.

  • It provides a filter plugin for views. To search if user input point is
    being contained by the indexed polygons. (more predicates may be done, but
    not by now, look at possibilities in https://cwiki.apache.org/confluence/display/solr/SolrAdaptersForLuceneSpatial4#SolrAdaptersForLuceneSpatial4-SpatialPredicates)

  • Also it adds the configuration to do spatial queries to the schema.xml
    configuration that generates search_api_solr. Replacing:

      <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
    

    with

      <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
                spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
            autoIndex="true"
            validationRule="repairBuffer0"
            distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
    
  • TODO: Tests: With this module we can see how alter a search api query with
    jts_solr_queries_search_api_solr_converted_query_alter that modifies the select
    of a given search. It's the behavior that must be in the tests that must
    be done, search if there are any polygons indexed in a specified index that
    contains a given point, in code 'events' index is used.

Activity

Total releases
1
First release
Feb 2026
Latest release
4 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
2.0.x-dev Dev Feb 25, 2026