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

Michael McCandless commented on LUCENE-1382:
--------------------------------------------

It seems like there is a place for both approaches, since they have different 
tradeoffs?

I plan to add a static IndexReader method, much like eg getVersion, that lets 
you retrieve the commitUserData of the current segments_N file.  So, you're 
right, this enables fast checking of the latest commitUserData in the index.

I was thinking it's a single String, and if you set it (by calling 
commit(commitUserData)), and the commit completes successfully, it overwrites 
whatever was there, previously.

> Allow storing user data when IndexWriter.commit() is called
> -----------------------------------------------------------
>
>                 Key: LUCENE-1382
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1382
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>
> Spinoff from here:
>     http://www.mail-archive.com/[EMAIL PROTECTED]/msg22303.html
> The idea is to allow optionally passing an opaque String commitUserData to 
> the IndexWriter.commit method.  This String would be stored in the segments_N 
> file, and would be retrievable by an IndexReader.  Applications could then 
> use this to assign meaning to each commit.
> It would be nice to get this done for 2.4, but I don't think we should hold 
> the release for it.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to