Here is some code to help you along.  This should leave the source
indices intact and merges them into a destination.

                //the index to hold our merged index
                IndexWriter iw = new IndexWriter(dest, new
StandardAnalyzer(), true);

                string[] sourceIndices; //an array containing the sources
               // the directory containing the "source" indices
                foreach (string si in sourceindices)
                {
                    IndexReader r = IndexReader.Open(si);
                    iw.AddIndexes(new IndexReader[] { r });
                    r.Close();
                }

                iw.Optimize();
                iw.Close();

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to