Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 79649 invoked from network); 13 Aug 2004 12:04:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Aug 2004 12:04:12 -0000 Received: (qmail 34259 invoked by uid 500); 13 Aug 2004 12:04:04 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 34222 invoked by uid 500); 13 Aug 2004 12:04:03 -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 34209 invoked by uid 99); 13 Aug 2004 12:04:03 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [160.62.1.169] (HELO fw-mail12.novartis.com) (160.62.1.169) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 13 Aug 2004 05:03:57 -0700 Received: from mtap2.is.chbs ([192.37.33.19]) by fw-mail12.novartis.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id i7DC3tt34194524 for ; Fri, 13 Aug 2004 14:03:55 +0200 Received: from phchbs-s3025.EU.novartis.net (phchbs-s3025.eu.novartis.net [192.37.31.249]) by mtap2.is.chbs (Switch-3.1.6/Switch-3.1.0) with ESMTP id i7DC3s0D7888996 for ; Fri, 13 Aug 2004 14:03:54 +0200 Subject: Re: MultiSearcher to Indexing. To: "Lucene Users List" Message-ID: From: iouli.golovatyi@group.novartis.com Date: Fri, 13 Aug 2004 14:03:50 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Well, actually we use a nice piece of hardware with a lot of memory and 2 cpu under linux. As front-end we use coldfusion application. Seems to be ok, but we have not tested on huge load yet. Let You know if smth. gettig wrong. Regards, J. "Vladimir Yuryev" ru> cc: Subject: Re: MultiSearcher to Indexing. 13.08.2004 13:06 Please respond to Category: |-------------------------| "Lucene Users | ( ) Action needed | List" | ( ) Decision needed | | ( ) General Information | |-------------------------| Hi Joel, Parallel method requests a lot of memories, but MultiSearcher requires slightly less memory. Tomcat at the large loading gives out a system mistake. If you have other experience of work that please tell me. Regards, Vladimir. On Fri, 13 Aug 2004 12:22:34 +0200 iouli.golovatyi@group.novartis.com wrote: > >Hi Vladimir, > >Can You please explain me what's the benefit of this approach and why >_pickles_? > >I f I understand correctly the ?-n was how to make query run >paralelly on >multi-index. Is ParalelMultiSearcher not for this? > >Regards, >Joel > > > > > > "Vladimir Yuryev" > > > Users List" > > ru> cc: > > > Subject: Re: >MultiSearcher to Indexing. > > 13.08.2004 06:45 > > > Please respond to Category: > |-------------------------| > > "Lucene Users | ( ) >Action needed | > List" | ( ) >Decision needed | > | ( ) >General Information | > |-------------------------| > > > > > > > > > >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 searchers[i] = new IndexSearcher(indexName[i]); > } > MultiSearcher multiSearcher=new MultiSearcher(searchers); > QueryParser qp = new QueryParser(FIELD_CONTENTS, analyzer); > query = QueryParser.parse(queryString, FIELD_CONTENTS, >analyzer); > hits = multiSearcher.search(query); > IndexReader reader[] = new IndexReader[indexName.length]; > Query[] expandedQueries=new Query[indexName.length]; > for(int i=0;i expandedQueries[i]=query.rewrite(reader[i]); > } > query=combine(expandedQueries); >... > >Best regards, >Vladimir. > > > > > >On Thu, 12 Aug 2004 20:51:13 +0530 > "Natarajan.T" 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 > > > > > > > >--------------------------------------------------------------------- >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