Custom search forms with Apache Solr David Hernández
UK and Europe's leading Drupal Consultancy. www.iO1.biz
What is Apache Solr? Open source search platform Written in Java Uses Apache Lucene library and extends it
Features of Apache Solr Full text search Faceted search Rich document handling Optimized for hight volume web traffic Scalability Plugin system
Who uses Apache Solr? Whitehouse.gov The Guardian Netflix SourceForge Ebay Digg Reddit
Apache Solr with Drupal Apache Solr Search Integration – apachesolr Apache Solr Views – apachesolr_views (dev) Facet API – facetapi Your Custom search form module!
Before starting... Be sure your Solr instance works. Connect your Drupal with Solr
Indexing your content Drush solr-index Drush solr-delete-index Drush solr-reindex [content type]
Code time!
Updating the index hook_apachesolr_update_index &$document: What is indexed $node: the node being indexed Dynamic fields Is_, ss_, its_...
Write your search form Function custom_search_forms_form Validation submit
hook_menu Add it to your menu
Prepare your query hook_apachesolr_prepare_query hook_apachesolr_query_alter
Theme the results Enjoy!
More ideas? Search form and results in a block In a panel Live results with Ajax
Find more ApacheSolr Project: http://lucene.apache.org/solr ApacheSolr module: http://dgo.to/apachesolr Documentation: http://dgo.to/343467 Aquia podcast: http://t.co/YRszSqw SolrQuerySyntax: http://wiki.apache.org/solr/SolrQuerySyntax
Thanks for watching and enjoy Drupal with Solr