search

How to set up Apache Solr search for Drupal 6 on a Debian GNU/Linux server

Apache Solr SearchAt DrupalCamp Stockholm 2009 Robert Douglass from Acquia talked about Drupal with Apache Solr search. Solr takes searching in Drupal a huge step forward. Speed and faceted search on author/type/term/language/date/CCK fields are the main features. A “Did you mean …” function is there also and it works surprisingly well.

There are also some really interesting things coming like multi site searching, dokument searching and searching of external non Drupal sites.

Drupal.org is already using Apache Solr search. Search for Sweden there and I’m the top result! http://drupal.org/search/apachesolr_search/sweden

When you search on Drupal.org or here on xdeb.org check out the blocks at the side of the search result page. They let you sort the result and filter it by author, node type and taxonomy terms. This is faceted search.

For people who don’t want to set up and maintain there own Apache Solr search Acquia has the service Acquia Search with a 30 day trial.

If you still here and want to know how to set up Apache Solr for Drupal 6 on a Debian GNU/Linux server here follows how I did it.

Swedish stemmer för Drupal 5 och 6 är släppt

Swedish stemmer moduleSwedish stemmer modulen implementerar en svensk “stemming algorithm” för att förbättra sökresultaten på svensk innehåll med Drupals inbyggda sökfunktion.

Modulen reducerar varje ord i sökindexet till ordet rot så att variationer på ett ord (t ex.. “klok, klokare, klokast” or “klockan, klockans”) räknas som likvärdiga vid sökning.

Spice up your Drupal 5 site search field with a bit of jQuery

Notice the search field here on xdeb.org? If you have JavaScript turned on you get the enhanced version with a nice placeholder/hint that disappears when you click in the field. The search button is hidden also, I assume everyone just hit return to to the search anyway so it just take up space.

If you use Safari, or any other Webkit browser, the search field is even more enhanced. Here how it looks for you who don’t use a Webkit browser.

Safari search field example

Aside from looking gorgeous, it adds value in terms of an enhanced user-experience. It works just like any other search field on Mac OS X. If you just want the nice Safari search field, take a look at http://drupal.org/project/safarisearch.

All this is done with JavaScript on the original Drupal search form ensuring graceful degradation. If you turn of JavaScript all that happens is that you get the standard search field and button.

Here follows the code I use to implement this here on xdeb.org.

Syndicate content