Re: Returning Separate Hits from Multisearcher

2004-05-10 Thread Ype Kingma
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]



Returning Separate Hits from Multisearcher

2004-05-10 Thread David Townsend

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?

David Townsend




Re: Returning Separate Hits from Multisearcher

2004-05-10 Thread Erik Hatcher
On May 10, 2004, at 8:13 AM, 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?
Instead of running multiple queries against the uber-index, try making 
a single uber query that builds up boolean query clauses that select 
each of the small index fields you're interested in.

Also, perhaps using a Filter to narrow down the search space on the 
uber-index is more along the lines of what you're after?

	Erik



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]