lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roman (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4215) DataImportHandler not using its own interface
Date Wed, 11 Jul 2012 23:43:34 GMT


roman commented on LUCENE-4215:

hi james,

I noticed the writerImpl (and started coding with it), but then realized that DIH might have
wanted to use its own interface... 

My usecase was to customize the rollback behaviour. With the current situation, one has to
make a custom DataImport class and duplicate lots of its code (DIH is not meant to be subclassed,
it seems...) or, i thought, make that small change and write:

new DataImporter() {
  public void runCmd(RequestInfo reqParams, DIHWriter sw) {
    DIHWriter w = new CustomWriter(null, ((SolrWriter) sw).req);
    super.runCmd(reqParams, w);

The "writerImpl" parameter is definitely useful. Thanks for the link!
> DataImportHandler not using its own interface
> ---------------------------------------------
>                 Key: LUCENE-4215
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/other
>    Affects Versions: 4.0-ALPHA
>            Reporter: roman
>              Labels: DIH
>             Fix For: 4.0
>         Attachments: dateimporthandler-use-generic-type.patch
> It is hard to extend DIH (e.g. to provide our own writers). DIH accepts only the SolrWriter
instances, despite they implement the DIHWriter interace.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message