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 Cheng <zh...@gmail.com> on 2012/10/01 06:34:07 UTC
Re: Index size doubles every time when I synchronize the RAM-based
index with the FD-based index
Yes. I build ram indexes from disk and update the ram indexes when new docs
come in (Step 1). When the number of new docs gets to 10,000, I will
persistent the ram indexes to disk (Step 2).
The bigger concern is however the update. I don't know how much ram is
eaten up, but I suppose whenever do the Step 1.
I have about 10 million docs. I use Lucene 3.5.
Thanks.
On Mon, Oct 1, 2012 at 4:02 AM, Ian Lea <ia...@gmail.com> wrote:
> Are you loading it from disk, adding loads of docs then writing it
> back to disk? That would do it.
>
> How many docs in the memory index? How many on disk? What version of
> lucene?
>
> --
> Ian.
>
>
> On Fri, Sep 28, 2012 at 1:56 AM, Cheng <zh...@gmail.com> wrote:
> > Hi,
> >
> > I have a ram based index which occasionally needs to be persistent with a
> > disk based index. Every time the size doubles which eats up my disk space
> > quickly. Below is the code. Could someone help me?
> >
> > Thanks,
> > Cheng
> >
> > try {
> > IndexWriterConfig iwc = new IndexWriterConfig(ERConstants.version,
> > ERConstants.analyzer);
> >
> > iwc.setOpenMode(OpenMode.CREATE);
> >
> > IndexWriter writer = new IndexWriter(new NIOFSDirectory(new File(
> > indexpath)), iwc);
> > writer.commit();
> >
> > writer.addIndexes(source);
> > writer.close();
> >
> > } catch (IOException e) {
> > e.printStackTrace();
> > }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>