SOLRSolr is the popular, blazing fast open sourceenterprise search platform from the ApacheLucene project.Its major features include powerful full-textsearch, hit highlighting, faceted search,dynamic clustering, database integration, richdocument handling, and geospatial search.Solr is written in Java
Geospatial search: definitionwikipedia:Geomatics (also known as geospatialtechnology or geomatics engineering) is thediscipline of gathering, storing, processing, anddelivering geographic information, orspatially referenced information.
Geolocation: ground markSurveyor-General Victoria (SGV) is responsiblefor Victoria’s Geodetic Survey Control Network.This is the infrastructure used to provideaccurate position and height referencing acrossVictoria. It is made up of 140,000 ground markshttp://www.dse.vic.gov.au/property-titles-and-maps/surveying-home-page/government-survey-services/victorias-survey-infrastructure
Drupal + SOLRNice tutorial:http://www.nickveenhof.be/blog/simple-guide- install-apache-solr-3x-drupal-7Check his blog for screencasts:http://www.nickveenhof.be/
Our Story• Drupal site• Using SOLR with apachesolr module• Location moduleProblem:Location information wasnt indexed
Drupal: Location moduleThe Location module allows real-worldgeographic locations to be associated withDrupal nodes.http://drupal.org/project/location
Location in actionhttp://drupal7.local:8080/node/1/edit
Why not indexed?SOLR doesnt know what to do with this customfield.And this field contains multiple values (street,city, province, country,...)
SolutionWe wrote some custom code to:• index location information properly• generate facets• provide a search form for geospatial search (longitude, latitude + radius)We changed schema.xml to use a"solr.LatLonType" field.
Schema.xml?The schema.xml file contains all of the detailsabout which fields your documents cancontain, and how those fields should be dealtwith when adding documents to the index, orwhen querying those fields.Schema.xml comes with the apachesolrmodule and is configured to handle drupalcontent.
Schema.xml?<!-- A specialized field for geospatial search. Ifindexed, this fieldType must not be multivalued.--><fieldType name="location"class="solr.LatLonType"subFieldSuffix="_coordinate"/>
Schema.xmlThis field is now included in schema.xml thatcomes with apachesolr module.
Future• Adding city + radius box• Getting coordinates of the city• Search for items within that range• Adding visualisation• Settings UI: miles or km,…What would you add? Let us know!http://drupal.org/project/apachesolr_location