We tested it so many times. 1st time we optimize, the new index file is created (merged one), but the existing index files are not deleted (because they might be still open for reading) 2nd time optimize, other than the new index file, all else gets deleted.
This is happening specifically on Windows. On Wed, Sep 28, 2011 at 8:23 PM, Vadim Kisselmann <v.kisselm...@googlemail.com> wrote: > 2011/9/28 Manish Bafna <manish.bafna...@gmail.com> > >> >>Will it not merge the index? >> > > yes > > >> >>While merging on windows, the old index files dont get deleted. >> >>(Windows has an issue where the file opened for reading cannot be >> >>deleted) >> >> >> >>So, if you call optimize again, it will delete the older index files. >> >> no. > during optimize you only delete docs, which are flagged as deleted. no > matter how old they are. > if your numDocs and maxDocs have the same number of Docs, you only rebuild > and merge your index, but you delete nothing. > > Regards > > > > >> On Wed, Sep 28, 2011 at 6:43 PM, Vadim Kisselmann >> <v.kisselm...@googlemail.com> wrote: >> > if numDocs und maxDocs have the same mumber of docs nothing will be >> deleted >> > on optimize. >> > You only rebuild your index. >> > >> > Regards >> > Vadim >> > >> > >> > >> > >> > 2011/9/28 Kissue Kissue <kissue...@gmail.com> >> > >> >> numDocs and maxDocs are same size. >> >> >> >> I was worried because when i used to use only Lucene for the same >> indexing, >> >> before optimization there are many files but after optimization i always >> >> end >> >> up with just 3 files in my index filder. Just want to find out if this >> was >> >> ok. >> >> >> >> Thanks >> >> >> >> On Wed, Sep 28, 2011 at 1:23 PM, Vadim Kisselmann < >> >> v.kisselm...@googlemail.com> wrote: >> >> >> >> > why should the optimization reduce the number of files? >> >> > It happens only when you indexing docs with same unique key. >> >> > >> >> > Have you differences in numDocs und maxDocs after optimize? >> >> > If yes: >> >> > how is your optimize command ? >> >> > >> >> > Regards >> >> > Vadim >> >> > >> >> > >> >> > >> >> > 2011/9/28 Manish Bafna <manish.bafna...@gmail.com> >> >> > >> >> > > Try to do optimize twice. >> >> > > The 2nd one will be quick and will delete lot of files. >> >> > > >> >> > > On Wed, Sep 28, 2011 at 5:26 PM, Kissue Kissue <kissue...@gmail.com >> > >> >> > > wrote: >> >> > > > Hi, >> >> > > > >> >> > > > I am using solr 3.3. I noticed that after indexing about 700, 000 >> >> > > records >> >> > > > and running optimization at the end, i still have about 91 files >> in >> >> my >> >> > > index >> >> > > > directory. I thought that optimization was supposed to reduce the >> >> > number >> >> > > of >> >> > > > files. >> >> > > > >> >> > > > My settings are the default that came with Solr (mergefactor, etc) >> >> > > > >> >> > > > Any ideas what i could be doing wrong? >> >> > > > >> >> > > >> >> > >> >> >> > >> >