You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "work.gmail" <le...@gmail.com> on 2017/10/11 17:41:04 UTC
a topic of deleting the specified segments
Hey all
My team met a special Lucene problem right now, and we did not find an efficient way to solve it by far. So I come here to ask Lucene experts.
Our problem background is:
We have one index folder, it includes 3 segments (_1.si <http://1.si/>, _2.si <http://2.si/>, _3.si <http://3.si/>), and we try to merge (_2.si <http://2.si/> and _3.si <http://3.si/>) into one single segment (_4.si <http://4.si/>), and remove old (_2.si <http://2.si/> and _3.si <http://3.si/>). so finally we only have two segments (_1.si <http://1.si/> and _4.si <http://4.si/>), we are trying to use merge policy to merge the (_2.si <http://2.si/> and _3.si <http://3.si/>), we got (_4.si <http://4.si/>), but (_2.si <http://2.si/> and _3.si <http://3.si/>) are still there, we don’t find a way to remove them.
So could you guys help to give a resolution to remove old segments after customer’s merging?
Your any feedback is very appreciated!
thanks
Leo
RE: a topic of deleting the specified segments
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,
Be sure to close the IndexWriter and all open IndexReaders on the same index! Merged files may not be deleted before that is done.
Uwe
-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: work.gmail [mailto:leowang.work@gmail.com]
> Sent: Wednesday, October 11, 2017 7:41 PM
> To: java-user@lucene.apache.org; dev@lucene.apache.org;
> general@lucene.apache.org
> Subject: a topic of deleting the specified segments
>
> Hey all
>
> My team met a special Lucene problem right now, and we did not find an
> efficient way to solve it by far. So I come here to ask Lucene experts.
> Our problem background is:
> We have one index folder, it includes 3 segments (_1.si <http://1.si/>, _2.si
> <http://2.si/>, _3.si <http://3.si/>), and we try to merge (_2.si <http://2.si/>
> and _3.si <http://3.si/>) into one single segment (_4.si <http://4.si/>), and
> remove old (_2.si <http://2.si/> and _3.si <http://3.si/>). so finally we only
> have two segments (_1.si <http://1.si/> and _4.si <http://4.si/>), we are
> trying to use merge policy to merge the (_2.si <http://2.si/> and _3.si
> <http://3.si/>), we got (_4.si <http://4.si/>), but (_2.si <http://2.si/> and _3.si
> <http://3.si/>) are still there, we don’t find a way to remove them.
> So could you guys help to give a resolution to remove old segments after
> customer’s merging?
>
> Your any feedback is very appreciated!
>
> thanks
> Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org