lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: IndexWriterConfig.OpenMode.CREATE vs OpenMode.APPEND (index files)
Date Fri, 01 Feb 2013 11:50:31 GMT
It is by design, and 2.4 works the same way.

Are you closing or committing your IndexWriter after each added
document?  Because if you add 100 docs you should not see 100 versions
of these files, only one set of files in the end (many docs are
written to one segment).

Each segment holds the documents that were indexed by that instance of
IndexWriter.

When too many segments are in the index, they are merged according to
the merge policy.

Maybe you should pick up a copy of Lucene in Action (NOTE: I am a co
author) ... it explains the basics of how Lucene works.

Mike McCandless

http://blog.mikemccandless.com

On Thu, Jan 31, 2013 at 3:36 PM, saisantoshi <saisantoshi76@gmail.com> wrote:
> Is it by design. The older API (2.4) does not have this problem. Lets say if
> I have 100 updates or so.. then it will create 100 versions of those files
> in the index. This would increase the number of files in the index directory
> and might run into some file issues?
>
> It would be good to just have the following instead:
>
> _100.cfe
> _100.cfs
> _100.csi
> segments.gen
> segments_1
>
> why are the older files in the index folder? Are they used for anything?
> BTW,can I use any other option to just overwrite the existing files in the
> index directory such that there are only fewer files in the index directory.
>
> Thanks,
> Sai.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/IndexWriterConfig-OpenMode-CREATE-vs-OpenMode-APPEND-index-files-tp4037766p4037796.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message