logo       

Re: Adding undeleteDocument(docId | Term | Query) to IndexReader (and Inde: msg#01104

java-dev.lucene.apache.org

Subject: Re: Adding undeleteDocument(docId | Term | Query) to IndexReader (and IndexWriter?)

Or the undelete methods in IndexReader could just acquire the write lock?

I'll need to open IndexReader w/ readOnly=false if I want to delete/undelete a document, no? And then I'll need to acquire the write lock, just like any other "write" operation done through IndexReader, right?

Or do you suggest we allow this for readOnly IndexReaders too?

That might be too restrictive?

Yes - I pointed that just as a safety measure. However, sometimes (especially following the 'agile' guidelines) it's better to develop something for a problem we know exist, rather than trying to over-engineer for something we 'think might exist'. If a good use case will be presented in the future which requires the undelete to work also in readers that did not do the delete themselves, we can change that behavior then, no?

Maybe I'll start to work on it and we can decide that as we go? There's no point making decisions now, when we don't know if it is a major thing to support or not. Maybe it can be supported 'for free', and then it won't be a question at all.

Shai

On Wed, Jul 29, 2009 at 10:58 PM, Michael McCandless <lucene@xxxxxxxxxxxxxxxxxx> wrote:
undeleteAll doesn't have such a restriction.

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise