Hi - We are using SOLR to process XML input files using the Data Import Handler. I didn't see a way to move the xml files out of the way after processing, so I wrote a small extension to allow this. The "How to Contribute <http://wiki.apache.org/solr/HowToContribute>" page says to pitch the request to the developer list in order to decide whether or not to submit a patch. As such, here goes:
The new code basically extends FileDataSource and wraps the underlying reader such that when the "close" method on the input stream is called, the file is moved to a configurable archive directory. It is unclear to me whether this is the correct place to put it (I pondered changing the FileListEntityProcessor but this somehow felt safer). I realize that a more robust implementation would consider the success status of the file being processed and would also allow for configurable policies rather than a concrete implementation. Nonetheless, I didn't want the perfect to be the enemy of the good. Please peruse the attached source code file and provide feedback as to the merit of the idea, whether I ought to submit a JIRA ticket/patch and if my approach is correct. Thanks! Josh Harness
ArchivingFileDataSource.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org