You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Alex Kiselevski <AL...@Amdocs.com> on 2005/03/01 15:28:06 UTC

Remove document fails

Hi,
I have a problem doing IndexReader.delete(int doc)
and it fails on lock error.



Alex Kiselevski

+9.729.776.4346 (desk)
+9.729.776.1504 (fax)

AMDOCS > INTEGRATED CUSTOMER MANAGEMENT




The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.

Re: Remove document fails

Posted by Mauro Verrocchio <ma...@gmail.com>.
Sorry! I didn't know that: just got a fast look at the methods...
Thanks anyway: this would be useful to remeber :)

Mauro.

On Thu, 03 Mar 2005 11:58:39 +0200, Volodymyr Bychkoviak
<vb...@i-hypergrid.com> wrote:
> If you read javadoc carefully you can read that unlock should be used
> only for recovery reason. Or you can damage your index.
> 
> Mauro Verrocchio wrote:
> 
> >Try IndexDirectory.unlock(directory). It's in the javadoc.
> >
> >Cheers,
> >Mauro.
> >
> >
> >On Wed, 02 Mar 2005 22:40:27 +0100, Gusenbauer Stefan
> ><gu...@eduhi.at> wrote:
> >
> >
> >>Volodymyr Bychkoviak wrote:
> >>
> >>
> >>
> >>>may be you have open IndexWriter at the same time you are trying to
> >>>delete document.
> >>>
> >>>Alex Kiselevski wrote:
> >>>
> >>>
> >>>
> >>>>Hi,
> >>>>I have a problem doing IndexReader.delete(int doc)
> >>>>and it fails on lock error.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>Alex Kiselevski
> >>>>
> >>>>
> >>>>+9.729.776.4346 (desk)
> >>>>+9.729.776.1504 (fax)
> >>>>
> >>>>AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>The information contained in this message is proprietary of Amdocs,
> >>>>protected from disclosure, and may be privileged.
> >>>>The information is intended to be conveyed only to the designated
> >>>>recipient(s)
> >>>>of the message. If the reader of this message is not the intended
> >>>>recipient,
> >>>>you are hereby notified that any dissemination, use, distribution or
> >>>>copying of
> >>>>
> >>>>this communication is strictly prohibited and may be unlawful.
> >>>>
> >>>>If you have received this communication in error, please notify us
> >>>>immediately
> >>>>by replying to the message and deleting it from your computer.
> >>>>Thank you.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>I've the same problem that my IndexWriter is open. Is there any
> >>possibility to unlock it manually because i do not want to close it.
> >>Thank you
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >>For additional commands, e-mail: java-user-help@lucene.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Remove document fails

Posted by Gusenbauer Stefan <gu...@eduhi.at>.
Volodymyr Bychkoviak wrote:

> If you read javadoc carefully you can read that unlock should be used 
> only for recovery reason. Or you can damage your index.
>
> Mauro Verrocchio wrote:
>
>> Try IndexDirectory.unlock(directory). It's in the javadoc.
>>
>> Cheers,
>> Mauro.
>>
>>
>> On Wed, 02 Mar 2005 22:40:27 +0100, Gusenbauer Stefan
>> <gu...@eduhi.at> wrote:
>>  
>>
>>> Volodymyr Bychkoviak wrote:
>>>
>>>   
>>>
>>>> may be you have open IndexWriter at the same time you are trying to
>>>> delete document.
>>>>
>>>> Alex Kiselevski wrote:
>>>>
>>>>     
>>>>
>>>>> Hi,
>>>>> I have a problem doing IndexReader.delete(int doc)
>>>>> and it fails on lock error.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Alex Kiselevski
>>>>>
>>>>>
>>>>> +9.729.776.4346 (desk)
>>>>> +9.729.776.1504 (fax)
>>>>>
>>>>> AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The information contained in this message is proprietary of Amdocs,
>>>>> protected from disclosure, and may be privileged.
>>>>> The information is intended to be conveyed only to the designated
>>>>> recipient(s)
>>>>> of the message. If the reader of this message is not the intended
>>>>> recipient,
>>>>> you are hereby notified that any dissemination, use, distribution or
>>>>> copying of
>>>>>
>>>>> this communication is strictly prohibited and may be unlawful.
>>>>>
>>>>> If you have received this communication in error, please notify us
>>>>> immediately
>>>>> by replying to the message and deleting it from your computer.
>>>>> Thank you.
>>>>>
>>>>>
>>>>>       
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>
>>> I've the same problem that my IndexWriter is open. Is there any
>>> possibility to unlock it manually because i do not want to close it.
>>> Thank you
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>>   
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>  
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
Thank you for your help, I've constructed a workaround with an arraylist 
so i can insert documents after deleting and i there is no conflict 
between the indexreader and the indexwriter.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Remove document fails

Posted by Volodymyr Bychkoviak <vb...@i-hypergrid.com>.
If you read javadoc carefully you can read that unlock should be used 
only for recovery reason. Or you can damage your index.

Mauro Verrocchio wrote:

>Try IndexDirectory.unlock(directory). It's in the javadoc.
>
>Cheers,
>Mauro.
>
>
>On Wed, 02 Mar 2005 22:40:27 +0100, Gusenbauer Stefan
><gu...@eduhi.at> wrote:
>  
>
>>Volodymyr Bychkoviak wrote:
>>
>>    
>>
>>>may be you have open IndexWriter at the same time you are trying to
>>>delete document.
>>>
>>>Alex Kiselevski wrote:
>>>
>>>      
>>>
>>>>Hi,
>>>>I have a problem doing IndexReader.delete(int doc)
>>>>and it fails on lock error.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>Alex Kiselevski
>>>>
>>>>
>>>>+9.729.776.4346 (desk)
>>>>+9.729.776.1504 (fax)
>>>>
>>>>AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>The information contained in this message is proprietary of Amdocs,
>>>>protected from disclosure, and may be privileged.
>>>>The information is intended to be conveyed only to the designated
>>>>recipient(s)
>>>>of the message. If the reader of this message is not the intended
>>>>recipient,
>>>>you are hereby notified that any dissemination, use, distribution or
>>>>copying of
>>>>
>>>>this communication is strictly prohibited and may be unlawful.
>>>>
>>>>If you have received this communication in error, please notify us
>>>>immediately
>>>>by replying to the message and deleting it from your computer.
>>>>Thank you.
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>>I've the same problem that my IndexWriter is open. Is there any
>>possibility to unlock it manually because i do not want to close it.
>>Thank you
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Remove document fails

Posted by Mauro Verrocchio <ma...@gmail.com>.
Try IndexDirectory.unlock(directory). It's in the javadoc.

Cheers,
Mauro.


On Wed, 02 Mar 2005 22:40:27 +0100, Gusenbauer Stefan
<gu...@eduhi.at> wrote:
> Volodymyr Bychkoviak wrote:
> 
> > may be you have open IndexWriter at the same time you are trying to
> > delete document.
> >
> > Alex Kiselevski wrote:
> >
> >> Hi,
> >> I have a problem doing IndexReader.delete(int doc)
> >> and it fails on lock error.
> >>
> >>
> >>
> >>
> >>
> >> Alex Kiselevski
> >>
> >>
> >> +9.729.776.4346 (desk)
> >> +9.729.776.1504 (fax)
> >>
> >> AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
> >>
> >>
> >>
> >>
> >>
> >> The information contained in this message is proprietary of Amdocs,
> >> protected from disclosure, and may be privileged.
> >> The information is intended to be conveyed only to the designated
> >> recipient(s)
> >> of the message. If the reader of this message is not the intended
> >> recipient,
> >> you are hereby notified that any dissemination, use, distribution or
> >> copying of
> >>
> >> this communication is strictly prohibited and may be unlawful.
> >>
> >> If you have received this communication in error, please notify us
> >> immediately
> >> by replying to the message and deleting it from your computer.
> >> Thank you.
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> >
> >
> I've the same problem that my IndexWriter is open. Is there any
> possibility to unlock it manually because i do not want to close it.
> Thank you
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Remove document fails

Posted by Gusenbauer Stefan <gu...@eduhi.at>.
Volodymyr Bychkoviak wrote:

> may be you have open IndexWriter at the same time you are trying to 
> delete document.
>
> Alex Kiselevski wrote:
>
>> Hi,
>> I have a problem doing IndexReader.delete(int doc)
>> and it fails on lock error.
>>
>>
>>
>>
>>
>> Alex Kiselevski
>>
>>
>> +9.729.776.4346 (desk)
>> +9.729.776.1504 (fax)
>>
>> AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
>>
>>
>>
>>
>>
>> The information contained in this message is proprietary of Amdocs,
>> protected from disclosure, and may be privileged.
>> The information is intended to be conveyed only to the designated 
>> recipient(s)
>> of the message. If the reader of this message is not the intended 
>> recipient,
>> you are hereby notified that any dissemination, use, distribution or 
>> copying of
>>
>> this communication is strictly prohibited and may be unlawful.
>>
>> If you have received this communication in error, please notify us 
>> immediately
>> by replying to the message and deleting it from your computer.
>> Thank you.
>>  
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
I've the same problem that my IndexWriter is open. Is there any 
possibility to unlock it manually because i do not want to close it.
Thank you


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Remove document fails

Posted by Volodymyr Bychkoviak <vb...@i-hypergrid.com>.
may be you have open IndexWriter at the same time you are trying to 
delete document.

Alex Kiselevski wrote:

>Hi,
>I have a problem doing IndexReader.delete(int doc)
>and it fails on lock error.
>
>
>
>
>
>Alex Kiselevski
>
>
>+9.729.776.4346 (desk)
>+9.729.776.1504 (fax)
>
>AMDOCS > INTEGRATED CUSTOMER MANAGEMENT
>
>
>
>
>
>The information contained in this message is proprietary of Amdocs,
>protected from disclosure, and may be privileged.
>The information is intended to be conveyed only to the designated recipient(s)
>of the message. If the reader of this message is not the intended recipient,
>you are hereby notified that any dissemination, use, distribution or copying of
>
>this communication is strictly prohibited and may be unlawful.
>
>If you have received this communication in error, please notify us immediately
>by replying to the message and deleting it from your computer.
>Thank you.
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org