Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 219FD419D for ; Mon, 9 May 2011 15:52:20 +0000 (UTC) Received: (qmail 9695 invoked by uid 500); 9 May 2011 15:52:18 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 9653 invoked by uid 500); 9 May 2011 15:52:18 -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 9645 invoked by uid 99); 9 May 2011 15:52:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 15:52:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 15:52:10 +0000 Received: by iwr19 with SMTP id 19so6919131iwr.35 for ; Mon, 09 May 2011 08:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=BCh79+GmFd13Etg2XVpTxe/SIqnxhGdH7izetQTDJ7Y=; b=jVXBMMNCz9zum9pvifY+Y6TWoJXp5wn3mRA3kVIrtcYLWfcHUux6ILL7F6gwbkSJpw 4+ORIP1V56U8krIVB2p7tYpG8VLzMT2UgVLjnujKAUKcMqcmJJEgcChhoz887V0xZRPt jcCZ+jofqtvfdNA0pARcJr90RsDMzsEu49A9Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=RXRN7B1jvFAEpT7ktACJVdCamsaFYGMCcxIIcmDMxOwX+brJ3UcGMW4/EZpUjsd3Vo lnoutXAWNxkOw287Zi+VbsqwPSa9/drL5gtWG4VlN+3kLEfRKp0A9LV5yi10ITWTNlmj 2ncgJ+0TEq9avGOlOVp3k24xSEQ7yJhT8Ce7I= Received: by 10.231.142.103 with SMTP id p39mr4417537ibu.178.1304956309112; Mon, 09 May 2011 08:51:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.207.80 with HTTP; Mon, 9 May 2011 08:51:28 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Mon, 9 May 2011 16:51:28 +0100 Message-ID: Subject: Re: Sharding Techniques To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org > ... > 1. I've not tested my application with single index as initially (a few > years back) we thought smaller the index size (7 indexes for default 80% > searches) the faster the search time would be ... Possibly. Maybe it will be acceptable to make some searches a bit slower in order to make the slow ones faster. But my guess would still be that a single index with filtered searches would be quicker for most searches. > 2. For sharing/caching we create index readers once the server starts and > use these throughout the server's life (1 day). At the time of searches, > number of indexes to be read are decided by analyzing the search parameters. > IndexSearchers are created on persistent IndexReaders and finally a > ParallelMultiSearcher is created from these IndexSearchers (I hope this is > not a problem, or is it???) Sounds fine, except that in latest versions of lucene, ParallelMultiSearcher is deprecated. > 3. I had gone through the link you provided and some of the things are > already implemented (e.g. readOnly=true, NIOFSDirectory, optmizing, etc.). > We are using filters for some of the fields and caching those filters in the > memory, through hashtable. Sounds good. > Will reducing number of tokens in a particular field in index reduce the > search time (or CPU, memory etc)? Yes, in theory, but unless the numbers are really high I doubt you'll notice it. > E.g. I have 11 documents and tokens in field (fld1) are > 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 and 2.0. > > The query is - fld1:[ 1.0 TO 2.0 ] > > Would it make any difference if the tokens in documents (in the same field) > would be > 1,1,1,1,1,1,1,1,1,2 > ?? Unlikely. But if those are all always numbers it would be worth looking at NumericField and NumericRangeQuery. -- Ian. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org