---
url: 'https://dri.es/drupal-the-semantic-web-and-search'
title: 'Drupal, the semantic web and search'
author:
  name: 'Dries Buytaert'
  url: 'https://dri.es/about'
date: '2008-10-15T07:43:51-04:00'
license: 'https://creativecommons.org/licenses/by/4.0/'
type: blog
summary: 'I can has semweb in Drupal core?'
tags:
  - Drupal
  - 'Semantic web'
published: true
id: 520
---

# Drupal, the semantic web and search

All major search engines, including Google and Yahoo!, are moving aggressively trying to capture structured data. This isn't exactly a surprise because it provides tremendous opportunity. Let's take the example of *product search*. Imagine the web as a huge database of millions of products, and search engines like Google and Yahoo! giving you a rich set of controls to filter by price, availability, color, shipping cost, user ratings, and more. Wouldn't it be great to be able to search all the world's products from a single page with a single interface? I'd think so too.

It is [waiting to happen](https://developer.yahoo.com/searchmonkey/smguide/SearchMonkey-Product-details.html); we just have to connect the dots. That is, we have to make Drupal emit structured information.

Hundreds of thousands of Drupal sites contain vast amounts of structured data, covering an enormous range of topics, including product information. Unfortunately, that structure is hidden deep in Drupal's database and doesn't surface to the HTML code generated by Drupal. As such, search engines can't pick it up as a product, and they'd fail to include it in their world-wide product database.

I first talked about the semantic web and Drupal in [my DrupalCon keynote last year in Boston](https://dri.es/state-of-drupal-presentation-march-2008). In my presentation, I laid down the challenge that we need to put *fields in core and make them first class citizens*. Once fields are thus empowered, they can be associated with rich, semantic meta-data that Drupal could output in its XHTML as [RDFa](https://www.w3.org/TR/xhtml-rdfa-primer/ "RDFa Primer"). For example, say we have an HTML textfield that captures a number, and that we assign it an RDF property of 'price'. Semantic search engines then recognize it as a 'price' field. Add fields for 'shipping cost', 'weight', 'color' (and/or any number of others) and the possibilities become very exciting. I envision a Drupal core CCK with the power to do just that.

Here is another example. Imagine a standard Drupal node-type called 'job'. The fields in the job node-type would have RDF [properties](https://developer.yahoo.com/searchmonkey/smguide/SearchMonkey-Jobs-details.html) associated with them mapping to salary, duration, industry, location, and so on. Creating a new job posting on a Drupal site would generate RDFa that semantic search engines like [Yahoo!'s SearchMonkey](https://developer.yahoo.com/searchmonkey/) would pick up and the job would be included in their world-wide job database.

Technologies like this [disintermediate so many existing websites and organizations](https://dri.es/drupal-and-eliminating-middlemen) that it makes my head spin. It is too great an opportunity for us to pass up on. By adding semantic technology to Drupal core, I think we can make a notable contribution to the future of the web.

This kind of technology is not limited to global search. On a social networking site built with Drupal, it opens up the possibility to do all sorts of *deep social searches* - searching by types and levels of relationships while simultaneously filtering by other criteria. I was talking with [David Peterson](https://www.sitepoint.com/articlelist/497/) the other day about this, and if Drupal core supported [FOAF](http://www.foaf-project.org) and [SIOC](http://www.sioc-project.org) out of the box, you could search within your network of friends or colleagues. This would be a fundamentally new way to take advantage of your network or significantly increase the relevance of certain searches.

*I can has semweb in Drupal core?*
