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]



Reply via email to