lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terence Parr <>
Subject MultiSearcher improvement available
Date Thu, 07 Feb 2002 22:35:15 GMT

I have a trivial extension to MultiSearcher that allows you to use more 
than a single query.  Currently, I can only find a way to apply a single 
query across multiple databases.  I have heterogeneous databases that 
require different queries (well, slightly but enough) be applied for 
each database.  I made a subclass whose constructor takes both an array 
of searchers and array of queries.  I then override

     TopDocs search(Query query /* ignored */, Filter filter, int 
nDocs) {...}

to use

             TopDocs docs = searchers[i].search(queries[i], filter, 

instead of

             TopDocs docs = searchers[i].search(queries, filter, nDocs);

Doug: can you tell me why MultiSearcher is final?  It makes it pretty 
hard to specialize your work ;)

Am i missing an existing way to do this?

Thanks again for a great product...jGuru is better for it's use of 
Lucene. :)

It's trivial, but does anybody want the simple class?  Should it be 
included in the next release candidate?  Am I the only one that wants 
multiple databases with different structures?

Chief Scientist & Co-founder,
Creator, ANTLR Parser Generator:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message