GSoC Week #12: How to Install and configure Search API Location

Hi folks, this week is the last week of Google Summer of Code'17 and as I promised to deliver a complete working Search_Api_Location Module by the end of this summer, finally today I am going to guide you how to install and configure the module. All patches have been pushed to Drupal code base, an Alpha version of the same will be released soon.

Well before going to install if you are wondering what the module is about and how it can help you to improving geospatial functionalities of your site then you can have a quick look on one of my previous post. I have also configured a demo server with latest dev version of search_api_location and Apache Solr 6.6.  You can try out the demo here d8.drupal-search-api.me 

How to configure ?

Step-1 (Download the modules with their dependencies)

composer require drupal/search_api_solr:1.x-dev 

composer require drupal/search_api

composer require drupal/search_api_location:1.x-dev

composer require drupal/facets

composer require drupal/geofield

composer require drupal/geocoder

Step-2 (Enable the modules)

drush en search_api_location 

drush en facets_map_widget

drush en geofield

drush en geocoder

Step-3 (Configure the Search API with Solr Backend)

You need to create a search views using search api and search_api_solr as backend service class. Watch a video here 

Step-4 (Location Indexing)

Create custom content type with location field. Go to /admin/config/search/search-api/index/YOUR_INDEX_NAME/fields and add the location field as Recursive Prefix Data type And trigger indexing.

Step-5 (Configure Facets_map_widget) 

Go to /admin/config/search/facets and add a facet widget for your location field. Then in the widget section select "Interactive map showing the clustered heatmap", go down and select "Facet Map Processor" and you are done. Watch a video here to enable any facet widget.

Watch this small video to configure the module with above instructions.

Thank you for reading. If you are facing any problem in configuring the module comment below or ping me (dbjpanda) in IRC channel #drupal-search-api . If you find any bug don't forget to create an issue there in Drupal.Org project page. I will come with another complete video guide by next week with Alpha released version of the Search API Location Module. Stay tuned.