Earlier, I have worked with Google Appliance as the search server.
As a security requirement, the infrastructure team does not want Drupal application to write the index to the Solr server. They want solr to write the index (in the form of xml) to be stored in a directory. There would then be a script that copies over the xml to the actual index.
This allows us to have read only access to the index.
Issue - apachesolr module with SolrphpClient posts its xml to the solr server. We want to intercept the process of posting and write the index to a file at a given location.
Utilities involved - apachesolr module, tomcat server, solr server, SolrPhpClient
Solution - We are building a apachesolrExtension module that when enabled allows you to write the xml to a directory.
- Created a class Drupal_APache_Solr_service_extn class that extends Drupal_Apache_Solr_Service.
- Override _sendrawPost() method to write the xml index to a file rather than posting it to the solr server.
- Used the 'apachesolr_service_class' variable to make apachesolr_get_solr() load our class.
2 comments:
Thanks for sharing the article .Solr can indeed be quite efficient for the Drupal based websites.I'll be awaiting ur next post.Meanwhile I also came across an interesting article sharing info. about solr / Drupal integration at http://www.lucidimagination.com/blog/2009/02/19/drupalorg-fires-up-on-solr/
Thanks for your interest Brad ! You can download the module from here:
http://manasi.drupalgardens.com/content/apachesolr-extension-module
Post a Comment