I am using Apache Solr in a Drupal 6.22 website. The version of Solr is 3.6.2 and using apachesolr-6.x-1.8 module with it. Solr indexed all the node based contents well. But I want to have a custom table indexed. This table shows some promotional data to the website and has ~531,067 data. The schema is below,
+-------------+--------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+-------------------+----------------+
| topic_id | int(11) | NO | PRI | NULL | auto_increment |
| subject_id | int(11) | NO | MUL | NULL | |
| title | varchar(255) | NO | | NULL | |
| created | timestamp | NO | | CURRENT_TIMESTAMP | |
| reply_count | int(11) | NO | | NULL | |
| view_count | int(11) | NO | | NULL | |
+-------------+--------------+------+-----+-------------------+----------------+
How can I index that table in Solr and how can I add the schemas to schema.xml in Solr?
As I have seen the HOOKS in Exposed Solr Hooks (6.x-1.x) for developers, and it seems that using hook_apachesolr_update_index(&$document, $node)
will do the trick but I want to be sure on this.
Please provide me some idea on this. Thanks in advance.