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 Slav Boleslawski <sl...@hotmail.com> on 2016/06/10 09:11:24 UTC

Orpahned segments that cannot be force merged

Hi,


I can control the number of index segments when indexing using forceMerge(), but when searching occurs during indexing, then some segments become orphans and cannot be force merged. Why?Could someone please have a look if I'm doing anything wrong.


I attach the complete code for a test case to show the problem. The details are in the code documentation.


Regards


Slav

RE: Orpahned segments that cannot be force merged

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

Hi they are not orphans, they are just used still by the index reader. The operating system prevents them from being deleted as long as an index reader is open on them. Once you are done with forceMerging, you have to reopen your index reader (e.g., using SearcherManager). The files will disappear after a while.

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de <http://www.thetaphi.de/> 

eMail: uwe@thetaphi.de

 

From: Slav Boleslawski [mailto:slav-777@hotmail.com] 
Sent: Friday, June 10, 2016 11:11 AM
To: java-user@lucene.apache.org
Subject: Orpahned segments that cannot be force merged

 

Hi,

 

I can control the number of index segments when indexing using forceMerge(), but when searching occurs during indexing, then some segments become orphans and cannot be force merged. Why?Could someone please have a look if I'm doing anything wrong.

 

I attach the complete code for a test case to show the problem. The details are in the code documentation.

 

Regards

 

Slav