Re: IndexDeletionPolicy and IndexCommitPoint

2008-06-07 Thread Yonik Seeley
OK, does this mean it's now relatively safe/lightweight now to hold references to IndexCommit objects long term (across different IndexWriter objects on the same Directory?) I also notice that IndexCommit.equals() only compares the segment fine name... should it compare version also? If index

Re: IndexDeletionPolicy and IndexCommitPoint

2008-06-07 Thread Michael McCandless
Yonik Seeley wrote: OK, does this mean it's now relatively safe/lightweight now to hold references to IndexCommit objects long term (across different IndexWriter objects on the same Directory?) Yes, this should be fine. I also notice that IndexCommit.equals() only compares the segment fine

IndexDeletionPolicy and IndexCommitPoint

2008-02-21 Thread Tim Brennan
When implementing a custom IndexDeletionPolicy, is it sufficient to just use the segments filename (returned by IndexCommitPoint.getSegmentsFilename()) to compare CommitPoints to see if they are equal? I've looked at the code in SnapshotDeletionPolicy and it works by keeping a pointer to the

Re: IndexDeletionPolicy and IndexCommitPoint

2008-02-21 Thread Michael McCandless
Good questions! Yes, it's best to use the segments filename to compare commit points across close/reopen of IndexWriter as long as you ensure you're always working with the same index / Directory. You could change snapshot to be a String (the segments file name) and do all comparisons on that