Presentation is loading. Please wait.

Presentation is loading. Please wait.

Custom search forms with Apache Solr David Hernández

Similar presentations


Presentation on theme: "Custom search forms with Apache Solr David Hernández"— Presentation transcript:

1 Custom search forms with Apache Solr David Hernández

2 UK and Europe's leading Drupal Consultancy. www.iO1.biz

3 What is Apache Solr? Open source search platform Written in Java
Uses Apache Lucene library and extends it

4 Features of Apache Solr
Full text search Faceted search Rich document handling Optimized for hight volume web traffic Scalability Plugin system

5 Who uses Apache Solr? Whitehouse.gov The Guardian Netflix SourceForge
Ebay Digg Reddit

6 Apache Solr with Drupal
Apache Solr Search Integration – apachesolr Apache Solr Views – apachesolr_views (dev) Facet API – facetapi Your Custom search form module!

7 Before starting... Be sure your Solr instance works.
Connect your Drupal with Solr

8 Indexing your content Drush solr-index Drush solr-delete-index
Drush solr-reindex [content type]

9 Code time!

10 Updating the index hook_apachesolr_update_index
&$document: What is indexed $node: the node being indexed Dynamic fields Is_, ss_, its_...

11 Write your search form Function custom_search_forms_form Validation
submit

12 hook_menu Add it to your menu

13 Prepare your query hook_apachesolr_prepare_query
hook_apachesolr_query_alter

14 Theme the results Enjoy!

15 More ideas? Search form and results in a block In a panel
Live results with Ajax

16 Find more ApacheSolr Project: http://lucene.apache.org/solr
ApacheSolr module: Documentation: Aquia podcast: SolrQuerySyntax:

17 Thanks for watching and enjoy Drupal with Solr


Download ppt "Custom search forms with Apache Solr David Hernández"

Similar presentations


Ads by Google