Thanks! I have learned Solr as a power user and written a couple of simple filters. I'm not a Lucene heavy. Where is this in Lucene? Is it the default? I don't remember Lucene having the notion of a unique id (primary key).
In this merge code, with the latest Lucene 2.3, will the duplicates in solr/data1 override the records in solr/data0? Or the other way around? How do I add the new Lucene implementation? try { IndexWriter writer = new IndexWriter(new File("solr/data0/index"), new StandardAnalyzer(), false); Directory[] dirs = new Directory[]{FSDirectory.getDirectory(new File("solr/data1/index"))}; System.out.println(writer); writer.addIndexes(dirs); writer.close(); } catch (Exception e) { e.printStackTrace(); } Thanks, Lance Norskog -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yonik Seeley Sent: Saturday, April 05, 2008 2:37 PM To: solr-user@lucene.apache.org Cc: Norskog, Lance Subject: Re: Merging Solr index On Fri, Apr 4, 2008 at 6:26 PM, Norskog, Lance <[EMAIL PROTECTED]> wrote: > http://wiki.apache.org/solr/MergingSolrIndexes recommends using the > Lucene contributed app IndexMergeTool to merge two Solr indexes. What > happens if both indexes have records with the same unique key? Will > they both go into the new index? Yes. > Is the implementation of unique IDs in the Solr java or in Lucene? Both. It was originally just in Solr, but Lucene now has an implementation. Neither implementation will prevent this as both just remember documents (in memory) that were added and then periodically delete older documents with the same id. -Yonik