[ 
https://issues.apache.org/jira/browse/SOLR-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751023#action_12751023
 ] 

Luke Forehand commented on SOLR-1406:
-------------------------------------

I am implementing EventListeners for both onImportStart and onImportEnd that 
will work with a custom GZipFileDataSource for indexing.  Upon import start I 
will calculate a file list using the baseDir attribute of the 
FileListEntityProcessor, putting that list in a session attribute with Global 
scope.  Upon import end I will iterate over this file list and archive/remove 
these specific files.  The purpose is that if other files are added to the 
baseDir during indexing, they won't be archived/removed by my onImportEnd event 
implementation and will be available for the next full indexing operation 
(which happens on a schedule).

{code:xml}
<dataConfig>
  <dataSource name="myfilereader" type="FileDataSource"/>
    <document>
      <entity name="jc" rootEntity="false" dataSource="null"
        processor="FileListEntityProcessor"
        fileName="^.*\.xml$" recursive="true"
        baseDir="/usr/local/apache2/htdocs/imagery">
        ....
    </entity>
  </document>
</dataConfig>
{code}

> Add ability to retrieve DataConfig from dataimport Context
> ----------------------------------------------------------
>
>                 Key: SOLR-1406
>                 URL: https://issues.apache.org/jira/browse/SOLR-1406
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Luke Forehand
>            Assignee: Noble Paul
>         Attachments: SOLR-1406.patch
>
>
> The ability to retrieve the DataConfig is very useful for inspecting 
> configuration attributes within an EventListener!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to