[ https://issues.apache.org/jira/browse/LUCENE-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846906#action_12846906 ]
Shai Erera commented on LUCENE-2330: ------------------------------------ Sure, I'll annotate whatever is needed for PI (e.g. protected/public but still for internal use) as @lucene.experimental. After we see more than one extension of IW, we can decide whether those API need to made 'public' in essence (i.e. w/o the annotation). I've been burned plenty of times w/ bw policy :). > Allow easy extension of IndexWriter > ----------------------------------- > > Key: LUCENE-2330 > URL: https://issues.apache.org/jira/browse/LUCENE-2330 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Shai Erera > Fix For: 3.1 > > > IndexWriter is not so easy to extend. It hides a lot of useful methods from > extending classes as well as useful members (like infoStream). Most of this > stuff is very straightforward and I believe it's not exposed for no > particular reason. Over in LUCENE-1879 I plan extend IndexWriter to provide a > ParallelWriter which will support the parallel indexing requirements. For > that I'll need access to several methods and members. I plan to contain in > this issue some simple hooks, nothing fancy (and hopefully controversial). > I'll leave the rest to specific issues. For now: > # Introduce a protected default constructor and init(Directory, > IndexWriterConfig). That's required because ParallelWriter does not itself > index anything, but instead delegates to its Slices. So that ctor is for > convenience only, and I'll make it clear (through javadocs) that if one uses > it, one needs to call init(). PQ has the same pattern. > # Expose some members and methods that are useful for extensions (such as > config, infoStream etc.). Some candidates are package-private methods, but > these will be reviewed and converted on a case by case basis. > I don't plan to do anything drastic here, just prepare IW for easier > extendability. > I'll post a patch after LUCENE-2320 is committed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org