You search all four servers by doing this (the QueryParser in this example uses the Lucene 1.9 syntax):
Searchable[] searchables = new Searchable[]{(Searchable) Naming.lookup(x1), (Searchable) Naming.lookup(x2), ...}; MultiSearcher multiSearcher = new MultiSearcher(searchables); Hits hits = multiSearcher.search(new QueryParser("title", new StandardAnalyzer()).parse("title:Ajax")); /Daniel ________________________________ From: Vikas Khengare [mailto:[EMAIL PROTECTED] Sent: den 2 februari 2006 06:30 To: lucene-user@jakarta.apache.org; lucene-dev@jakarta.apache.org; java-dev@lucene.apache.org; java-user@lucene.apache.org; java-commits@lucene.apache.org Subject: Sending query to multiple servers and combine all Hits from them ? Hi Friends....... I am doing search application which has following scenario. Architecture ==> 1] Common GUI 2] When user enter one query then It should go to 4 searcher server (All servers are on remote machines) 3] After searching all 4 server should return results i.e. Hits ( All server return hits objects in diff formats i.e. all 4 servers return hit doc's in diff formats) 4] Combine all Hits and form only type of result 5] Show that result in Uniform way to user Problems ==> 1] How do I send my search query to all 4 searcher server. ? 2] After searching How do I get all result (Hits) for combining them in one bundle; Because they all are in different format. ? 3] Shall I use AJAX for sending query across multiple server and getting results back from all servers( Or any other technology, if yes specify) ? 4] How do I combine all hits ? Thanks.................. Best Regards [ [EMAIL PROTECTED] ]