On Monday 10 May 2004 14:13, David Townsend wrote: > We have a number of small indices and also an uber-index made up of all the > smaller indices. We need to get do a search across a number of the > sub-indices and get back a hit count from each. Currently we search each > index, we've also tried running multiple queries against the uber-index, > with a field denoting which subindex we are interested in. Obviously this > approach is very slow. Is there any way to use MultiSearcher to do this? > The problem we currently have with MultiSearcher is there seems no way to > tell how many hits came from each index. Is there a recommended way to do > this, or should we modify MultiSearcher to return information about the > hits on each index. > > any ideas?
You can use MultiSearcher.subSearcher(int docNr), evt. combined with a mapping back from the subSearchers to their original index. When you only need the count per subSearcher there is no need for a Hits object. A HitCollector will do nicely. Have fun, Ype --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]