thanks guys - apologies for being a leech, but would you mind pasting a snippet that might work just for pure lucene - or something I can learn from? I'm not entirely sure what's what in the nutch sample Stefan pasted.
cheers, Toby -----Original Message----- From: David Spencer [mailto:[EMAIL PROTECTED] Sent: Friday, 2 July 2004 9:24 AM To: Lucene Users List Subject: Re: search multiple indexes Stefan Groschupf wrote: >> http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/ >> MultiSearcher.html >> > 100% Right. > I personal found code samples more interesting then just java doc. Good point. > That why my hint, here the code snippet from nutch: But - warning - in normal use of Lucene you don't need the Similarity stuff.. > > /** Construct given a number of indexed segments. */ > public IndexSearcher(File[] segmentDirs) throws IOException { > NutchSimilarity sim = new NutchSimilarity(); > Searchable[] searchables = new Searchable[segmentDirs.length]; > segmentNames = new String[segmentDirs.length]; > for (int i = 0; i < segmentDirs.length; i++) { > org.apache.lucene.search.Searcher searcher = > new org.apache.lucene.search.IndexSearcher > (new File(segmentDirs[i], "index").toString()); > searcher.setSimilarity(sim); > searchables[i] = searcher; > segmentNames[i] = segmentDirs[i].getName(); > } > this.luceneSearcher = new MultiSearcher(searchables); > this.luceneSearcher.setSimilarity(sim); > } > > Kent Beck said: "Monkey see, Monkey do." ;-) > > Cheers, > Stefan > > --------------------------------------------------------------- > enterprise information technology consulting > open technology: http://www.media-style.com > open source: http://www.weta-group.net > open discussion: http://www.text-mining.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ______________________________________________________________________ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner.