Internationalization Support for ApacheSolr in Drupal

By Tom MacWright on Jun 12 2008

Sometimes it's easy to forget that less than half the web is in English. However, when managing large sites in multiple languages, it's good to be constantly aware of what language you're working with. That's why we wrote internationalization support for the ApacheSolr search module.

You can see how it works in this screencast.

With the new patches and a slight change to the search index schema, ApacheSolr will store the languages you choose with the i18n module. Then you can enable the Language Filter block to perform faceted searches based on language - to drill down to those that you speak or read.

Adding this and other extensions to ApacheSolr is possible because Solr itself uses a flexible schema to store document data. Adding an indexed language field was as simple as appending

   <field name="language" type="string" indexed="true" stored="true"/>

to the site's schema.xml file. This flexibility also allowed for a few other tweaks to the search engine, so stay tuned.

You can download the new patches and be sure to make the change specified to your schema.xml file.

0 tweets link to this blog post. Start a conversation with @developmentseed on Twitter.

Search

No results found.
About
Projects
Team
Blog