Apache Solr Custom Fields
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,
add your field_name to this array, and return.
$mapping[‘per-field’][$field_name] =array('callback' => '', 'index_type' => 'string');
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
Install Apachesolr and config it correctly.
1. copy module to you drupal module folder.
2. enable it.
Since Apache Solr module has ability to index custom fields in Drupal 7, so this module won't be developed in Drupal 7.
Credit by: 广州Drupal开发