Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 64973 invoked from network); 13 Aug 2004 04:45:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Aug 2004 04:45:16 -0000 Received: (qmail 63709 invoked by uid 500); 13 Aug 2004 04:45:08 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 63671 invoked by uid 500); 13 Aug 2004 04:45:07 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 63654 invoked by uid 99); 13 Aug 2004 04:45:07 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [81.19.66.30] (HELO mxb.rambler.ru) (81.19.66.30) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 12 Aug 2004 21:45:03 -0700 Received: from mail5.rambler.ru (mail5.rambler.ru [81.19.66.7]) by mxb.rambler.ru (Postfix) with ESMTP id 299D4845F0 for ; Fri, 13 Aug 2004 08:45:01 +0400 (MSD) Received: from [81.19.66.146] (account vyuryev@rambler.ru) by mail5.rambler.ru (CommuniGate Pro WebUser 4.1.8) with HTTP id 58505502 for lucene-user@jakarta.apache.org; Fri, 13 Aug 2004 08:45:01 +0400 From: "Vladimir Yuryev" Subject: Re: MultiSearcher to Indexing. To: "Lucene Users List" X-Mailer: CommuniGate Pro WebUser Interface v.4.1.8 Date: Fri, 13 Aug 2004 08:45:01 +0400 Message-ID: In-Reply-To: <006101c48080$011418c0$8714a8c0@ssl> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251"; format="flowed" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Natarajan, MultiSeacher - it is well, but this a way have pickles. Example, but it is not sample: public Query combine(Query[] queries) throws IOException { if (expandedQueries.length < 2) { return queries[0]; } Query[] combined = new Query[2]; combined[0] = new BooleanQuery(); BooleanQuery.setMaxClauseCount(10000); for (int i = 0; i < queries.length; i++) { combined[1] = queries[i]; if (queries[i] instanceof BooleanQuery || queries[i] instanceof MultiTermQuery || queries[i] instanceof PrefixQuery || queries[i] instanceof RangeQuery) { combined[0] = Query.mergeBooleanQueries(combined); } else if (queries[i] instanceof PhraseQuery) { Term[] queryTerms = ((PhraseQuery)queries[i]).getTerms(); for (int j = 0; j < queryTerms.length; j++) { TermQuery q = new TermQuery(queryTerms[j]); ((BooleanQuery)combined[0]).add(q, true, false); } } else ((BooleanQuery)combined[0]).add(queries[i], true, false); } return combined[0]; } ... Searcher[] searchers = new IndexSearcher[indexName.length]; for(int i=0;i wrote: >Thanks for your response. >Ok I can understand the concept ..... if you have any sample code pls >sent it to me. > >You have any idea about Parallel Searcher pls share to me. > >-----Original Message----- >From: Terence Lai [mailto:tlai@trekspace.com] >Sent: Thursday, August 12, 2004 8:40 PM >To: Lucene Users List >Subject: RE: MultiSearcher to Indexing. > >This is how I do it: > >IndexSearcher[] is = new IndexSearcher[2]; > >is[0] = new IndexSearcher(IndexDir1); // first index folder >is[1] = new IndexSearcher(IndexDir2); // second index folder > >MultiSearcher searcher = new MultiSearcher(is); > >searcher.search(query); > >I think that the MulitSearcher is only doing sequential search. >Alternately, you can use ParallelMultiSearcher which allows you to do >the search in parallel. > >Hope this helps, >Terence > > > >> FYI >> >> I have an Indexing files in different folders, in this time how can >>I >> doing the Searching process using MultiSearcher. >> >> Thanks, >> Natarajan. >> >> >> >> >> >> > > > > >---------------------------------------------------------- >Get your free email account from http://www.trekspace.com > Your Internet Virtual Desktop! > >--------------------------------------------------------------------- >To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org