Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 11598 invoked from network); 31 May 2006 07:48:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2006 07:48:03 -0000 Received: (qmail 41704 invoked by uid 500); 31 May 2006 07:47:57 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 41676 invoked by uid 500); 31 May 2006 07:47:56 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 41665 invoked by uid 99); 31 May 2006 07:47:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 00:47:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [62.160.235.108] (HELO mh4.cvf.fr) (62.160.235.108) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 00:47:56 -0700 Received: from [10.175.254.140] (helo=ms.int75.cvf) by mh4.cvf.fr with esmtp for id 1FlLQU-0002pK-00; Wed, 31 May 2006 09:47:34 +0200 Received: from [127.0.0.1] (helo=sdalouche1.dev75.cvf) by ms.int75.cvf with esmtp id 1FlLQU-00049A-00 for ; Wed, 31 May 2006 09:47:34 +0200 Subject: Re: Lucene search optimization From: Sami Dalouche To: java-user@lucene.apache.org In-Reply-To: References: <1149001927.19768.19.camel@samcvf> Content-Type: text/plain Date: Wed, 31 May 2006 09:44:54 +0200 Message-Id: <1149061494.362.7.camel@samcvf> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-complaints-to: abuse@cvf.fr X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, 1) Actually, I am not using Lucene directly, but a wrapper called compass. I am using the find() method of the CompassSession, which code is : public CompassHits find(String query) throws CompassException { return createQueryBuilder().queryString(query).toQuery().hits(); } And all of these objects are pure wrappers around lucene equivalents, nothing more. 2) What I am timing is only the find call : -- start timer CompassHits hits = compassSession.find("cityName:"+ name+"~"); -- stop timer 3) I am not sorting anything, but lucene is returning the hits by relevance. Does this count as sorting ? 4) I tried to time the thing for ~10 queries, and the results are roughly the same. Can go down to 2 seconds, which is still way too much... Thanks for helping sami Dalouche On Tue, 2006-05-30 at 13:58 -0700, Chris Hostetter wrote: > : Fuzzy searching against this property takes around 3 seconds, which is > : way too much for what I plan to do, so I am considering the possible > > whenever anyone has a question about how to speed up a search, and the > current amount of time the search takes is more then a second, there are a > few questions i allways want to ask: > > 1) what method exactly on the Searcher interface are you using the > execute the search? > 2) what exactly are you timing? (the time the search method call takes?, > the time it takes you to iterate over the results? etc...) > 3) are you sorting by any particular field? > 4) are you reusing the Searcher instance for more then one query? are > you timing more then one query and taking the average? > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org