Robert Douglass's blog

State-of-the-Art Search with Drupal and Apache Solr - FOSDEM 2010

Robert Douglass's picture

Use Apache Solr to search in files

Robert Douglass's picture

Drupal's file handling capabilities keep getting better. Beyond the core upload module, the filefield module for CCK has enabled us to build sites with all sorts of files; documents, images, music, videos, and so forth. Searching within these docuements, however, has never been a common feature on Drupal sites. Some solutions have existed, particularly for extracting texts from PDFs and common wordprocessing documents. With Apache Solr, the attachments module, and an extension library called Tika, things can be much better. With Tika you can extract texts not only from Microsoft Office, Open Office, and PDF documents, you can also get text and metadata from images, songs, Flash movies and zipped archives. Searching for these texts is done as part of the normal Apache Solr driven site search.

The S-Files: Getting the most out of Comment Notify

Robert Douglass's picture

Tech Support Case Studies

If Facebook has shown us anything, it's that website users like to get timely notifications via email if there is something new to be seen on the site. Acquia Drupal includes the comment notify module that can help achieve this goal for your site. It sends email messages to content authors and commentators whenever new comments are added to content. There are ample subscription options to suit everyone, and an unsubscribe mechanism so that nobody has to endure unwanted items in their inbox.

Drupal DevRoom at Fosdem 2010

Robert Douglass's picture

FOSDEM is one of the great European tech conferences, held every year in Brussels. Two years ago I spoke there and introduced the Apache Solr module to the world. Dries and Gàbor introduced Acquia. So much has happened in those two years!

This year, on Sunday, February 7, I'll be back to once again talk about Apache Solr and state-of-the-art search techniques. There's a whole Drupal track, called the Drupal DevRoom, and plenty of other interesting sessions going on, too. If you can make it to Brussels for Fosdem I highly recommend it. It's full of that nitty-gritty hard-core geek stuff that makes open source software tick!

P.S.: The FOSDEM site uses Drupal, of course!

The S-Files: When node_load won't load, and the anonymous user has vanished

Robert Douglass's picture

Tech Support Case Studies

Use these two SQL commands to repair your Drupal 6 site to restore the anonymous user database record:

INSERT INTO users (name, mail) VALUES ('', '');
UPDATE users SET uid=0 WHERE name='';

The symptoms you'll see that tip you off that this is needed:
  1. node_load() is not loading nodes that you can prove are in the node table.
  2. node_delete() is not deleting nodes that you can prove are in the node table.
  3. The query SELECT * FROM users WHERE uid=0; returns zero rows.

Open Government, a citizen's excitement

Robert Douglass's picture

How refreshing it is when the US Government does something so right that my chest swells with pride and my heart fills with hope! How exciting it is that Drupal and Acquia can play a role in bringing openness to government. I'm referring to the Open Government Directive (OGD), an instruction from the President of the United States to all federal agencies to drastically change the way that government talks to and shares information with the public.

The OGD is predicated on three principles: transparancy, participation, and collaboration. Here I quote from the President's website:

Transparency promotes accountability by providing the public with information about what the Government is doing. Participation allows members of the public to contribute ideas and expertise so that their government can make policies with the benefit of information that is widely dispersed in society. Collaboration improves the effectiveness of Government by encouraging partnerships and cooperation within the Federal Government, across levels of government, and between the Government and private institutions.

The S-Files: Adding a custom sort to Acquia Search (Apache Solr)

Robert Douglass's picture

Tech Support Case Studies

We've received several inquiries about adding custom sorts to the the sorting block on search results for our popular Acquia Search product. This is fortunately quite easy, though it currently involves preparing a custom module that implements one hook:
hook_apachesolr_prepare_query(&$query)

<?php
  
function hook_apachesolr_prepare_query(&$query) {
    
// You can get the 'solr_field_name' from q=admin/reports/apachesolr
    
$query->set_available_sort('solr_field_name', array(
      
// how the sort link is to appear in the sorts block
      
'title' => t('Name of sort'),
      
'default' => 'asc', // or 'desc'
     
));
   }
?>

Acquia's Robert Douglass interview: Digital Marketing

Robert Douglass's picture

On October 22, 2009, I gave a keynote presentation at a digital marketing conference in Brussels. After my speech I was interviewed by the organizers of the conference. Here is the video. Note that my grandmother is actually 88, and really is on Facebook.

CCK and Views article in PHP User magazine

Robert Douglass's picture

This month's issue of the print magazine and website PHP User (in German) features an article on Drupal's CCK and Views module. The article was written by Meinolf Droste of MDWP, an Acquia Silver Partner.

Drupal at Digital Marketing First conference in Belgium

Robert Douglass's picture

Yesterday I gave a keynote presentation at the Digital Marketing First 09 trade show in Brussels, Belgium. Drupal was out in full force with four Belgian companies joining forces to make the conference a special Drupal-themed event. There were also a number of other companies present who are using Drupal.