lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-4215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412364#comment-13412364
] 

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:

{code:title=Bar.java|borderStyle=solid}
new DataImporter() {
  public void runCmd(RequestInfo reqParams, DIHWriter sw) {
    DIHWriter w = new CustomWriter(null, ((SolrWriter) sw).req);
    super.runCmd(reqParams, w);
  }
}
{code}

The "writerImpl" parameter is definitely useful. Thanks for the link!
                
> DataImportHandler not using its own interface
> ---------------------------------------------
>
>                 Key: LUCENE-4215
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4215
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message