Download & Extend

Apache Solr Custom Fields

apache solr index mechanism
apache solr screenshot

Apache Solr module helps you to integrate the ApacheSolr to Drupal, but this module doesn't include all CCK Fields.

Here are 2 HOOKs to add your custom fields to Apachesolr,

1. HOOK_apachesolr_cck_fields_alter
arguments: &$mappings,
add your field_name to this array, and return.

$mapping[‘per-field’][$field_name] =array('callback' => '', 'index_type' => 'string');

2. HOOK_apachesolr_update_index
arugments: $document, $node, $namespace.
so you can add any field to the $document.

Use Apachesolr Custom Fields to get out of any custom code to do this, what you need to is go to administration page and add some settings to determine which field need to be indexed or not.

The mechanism is to store all cck fields settings into database, and add your custom fields settings into database also.
Further more, this module convert those 2 hooks into the same one, and the same interface.
When you go to the page, index.php?admin/settings/apachesolr/custom-fields, there is a list of cck fields, and a link you can add your custom field. Go each field settings page on the page, you will get a page which contains more description on the page.

Apache Solr Indexing Mechanism
ApacheSolr indexing mechanism

Requirements:
Install Apachesolr and config it correctly.

INSTALL:
1. copy module to you drupal module folder.
2. enable it.

Any problem, please visit my blog Drupal and High Traffic WebSite Architecture | Drupal与高性能网站架构

Downloads

Version Downloads Date Links
6.x-1.2 tar.gz (12.84 KB) | zip (14.39 KB) 2012-Jan-30 Notes

Project Information


Maintainers for Apache Solr Custom Fields

  • robbin.zhao - 1 commit
    last: 6 weeks ago, first: 6 weeks ago

Issues for Apache Solr Custom Fields

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports