logo       

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

java-dev.lucene.apache.org

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

On Wed, Jul 29, 2009 at 4:06 PM, Shai Erera<serera@xxxxxxxxx> wrote:
>> 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?

Right, you'll definitely need to acquire the write lock for undeleteDoc.

>> 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.

I agree! There's no need to decide now. So let's defer.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-dev-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise