Wednesday, May 5, 2010

Drupal 5.x Search vs 6.x Search

Sometimes it seems like I am just searching for the perfect search.

I have a site that has close to 7,000 nodes of resource contacts. All the contacts have a phone number. I can jot down a phone number and have it exactly right. In Drupal 5.x I could search on the phone number and just go right to that resource.

I upgraded to Drupal 6.16 from Drupal 5.22 and the search died.

That was bad news for me and the usefulness of my site.

I would put a phone number in the search box and get almost every node in the site in the output.

So I searched all over drupal.org and the web via google.com and tried to learn what had changed to kill my search from Drupal 5.x to 6.x.

I never did find any documentation on the change that did me in, but in the Drupal handbook at the link below

http://drupal.org/handbook/modules/search/

I found the following

"If you're looking for an exact phrase, enclose it in quotation marks."

Now there's an idea - put your search keyword in quotes. That wasn't necessary in 5.x searches -- but apparently it is necessary in Drupal 6.x searches.

I was doing things like adding the Custom Google Search Engine module and the Search Lacene API search - but it was all unnecessary.

The power of quotation marks was all that I needed.