[ https://issues.apache.org/jira/browse/LUCENE-2481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873418#action_12873418 ]
Shai Erera commented on LUCENE-2481: ------------------------------------ Another thing about IDs - they are more user-level API than IndexCommit. So Earwin, I agree that we can have snapshot() and release(IndexCommit) to achieve the same functionality (need to be careful w/ multiple snapshots over the same IC). But for users, passing in an IndexCommit is not too friendly. Also, one customer of the API already uses the ID to encode some information that's interesting to him (e.g. name of the process + timestamp) which shows why IDs should remain. It's kind of like the commitUserData given to commits. Another reason is sharing the ID between two different code segments. It's easier to share a String-ID, than to share an IndexCommit. And what exactly is IndexCommit, and how does it translate to a key? Just the segmentsFileName? See - that's a too low level implementation detail IMO ... > Enhance SnapshotDeletionPolicy to allow taking multiple snapshots > ----------------------------------------------------------------- > > Key: LUCENE-2481 > URL: https://issues.apache.org/jira/browse/LUCENE-2481 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Shai Erera > Assignee: Shai Erera > Priority: Minor > Fix For: 3.1, 4.0 > > Attachments: LUCENE-2481-3x.patch > > > A spin off from here: > http://www.gossamer-threads.com/lists/lucene/java-dev/99161?do=post_view_threaded#99161 > I will: > # Replace snapshot() with snapshot(String), so that one can name/identify the > snapshot > # Add some supporting methods, like release(String), getSnapshots() etc. > # Some unit tests of course. > This is mostly written already - I want to contribute it. I've also written a > PersistentSDP, which persists the snapshots on stable storage (a Lucene index > in this case) to support opening an IW with existing snapshots already, so > they don't get deleted. If it's interesting, I can contribute it as well. > Porting my patch to the new API. Should post it soon. -- 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org