Re: More IndexDeletionPolicy questions

2008-03-05 Thread Michael McCandless
OK got it. Yes, sharing an index over NFS requires your own DeletionPolicy. So presumably you have readers on different machines accessing the index over NFS, and then one machine that does the writing to that index? How so you plan to get which commit point each of these readers is

Re: More IndexDeletionPolicy questions

2008-03-05 Thread Tim Brennan
No, I have multiple readers in the same VM. I track open readers within my VM and save those reader's commit points until the readers are gone. --tim - Michael McCandless [EMAIL PROTECTED] wrote: OK got it. Yes, sharing an index over NFS requires your own DeletionPolicy. So

Re: More IndexDeletionPolicy questions

2008-03-05 Thread Michael McCandless
Oh then I don't think you need a custom deletion policy. A single NFS client emulates delete-on-last-close semantics. Ie, if the deletion of the file, and the held-open file handles, happen through a single NFS client, then it emulates delete-on-last-close semantics for you, by creating

Re: More IndexDeletionPolicy questions

2008-03-05 Thread Tim Brennan
Ha, you know it never occurred to me that the driver might do this for me...I'll test it out. Thanks, --tim - Michael McCandless [EMAIL PROTECTED] wrote: Oh then I don't think you need a custom deletion policy. A single NFS client emulates delete-on-last-close semantics. Ie, if

Re: More IndexDeletionPolicy questions

2008-03-04 Thread Tim Brennan
The bigger picture here is NFS-safety. When I run a search, I hand off the search results to another thread so that they can be processed as necessary -- in particular so that they can be JOINed with a SQL DB -- but I don't want to completely lock the index from writes while doing a bunch of

Re: More IndexDeletionPolicy questions

2008-03-02 Thread Michael McCandless
Unfortunately, there is currently no way to ask an IndexReader (DirectoryIndexReader) which commit point it's using. I think it makes sense to add this. I'll open a Jira issue. More answers below: Tim Brennan wrote: Is there a direct way to ask an IndexReader what segment it is pointing

More IndexDeletionPolicy questions

2008-02-29 Thread Tim Brennan
Is there a direct way to ask an IndexReader what segment it is pointing at? That would make implementing custom deletion policies a LOT easier. It seems like it should be pretty simple -- keep a list of open IndexReaders, track what Segment files they're pointing to, and in onCommit don't