From java-user-return-22618-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Thu Aug 10 14:53:32 2006 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 9620 invoked from network); 10 Aug 2006 14:53:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Aug 2006 14:53:31 -0000 Received: (qmail 56259 invoked by uid 500); 10 Aug 2006 14:53:21 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 56186 invoked by uid 500); 10 Aug 2006 14:53:21 -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 56164 invoked by uid 99); 10 Aug 2006 14:53:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 07:53:20 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of yseeley@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO py-out-1112.google.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 07:53:12 -0700 Received: by py-out-1112.google.com with SMTP id s49so893583pyc for ; Thu, 10 Aug 2006 07:52:45 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=s6oamdozhcPt3pbt8AN2j1dB0fsmzYOVgeKhOLB+fIB2KiB+6ZNMZyYBKP+/TESOe6QP52hXT2Q2k1UxLtyxoI5PZfSN7iaYhYYa2NG1DJfTjKrI28yoX+hJ+QaxQqkbbWf3tsD4cGjuS6vMG8aAHCaS5gCQSjYfqIfk3uvdV1A= Received: by 10.35.135.12 with SMTP id m12mr4001180pyn; Thu, 10 Aug 2006 07:52:45 -0700 (PDT) Received: by 10.35.11.9 with HTTP; Thu, 10 Aug 2006 07:52:45 -0700 (PDT) Message-ID: Date: Thu, 10 Aug 2006 10:52:45 -0400 From: "Yonik Seeley" Sender: yseeley@gmail.com To: java-user@lucene.apache.org Subject: Re: Poor performance "race condition" in FieldSortedHitQueue In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 7cf567c5be5d045e X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 8/10/06, Doron Cohen wrote: > I have one more comment on the cache implementation. It feels to me > somewhat not right that a static system wide object (FieldCache.DEFAULT) is > managing the field caching for all the indexReaders in the JVM (possibly of > different indexes), when in fact there is no > dependency/relation/cooperation between the different indexReaders, cache > wise. It seems cleaner and simpler to have FieldCacheImpl take care of a > single IndexReader, and so have that cache "belong" to the indexReader. > This would make the cache implementation simpler. Synchronization would > only need to be on field values. This way we also get rid of the > WeakHashMap (which, btw, I never got to fully trust). Sorting was introduced to Lucene before my time, so I don't know the reasons behind it. Maybe it was seen as non-optimial or non-core and so was kept out of the IndexReader. I admit, it does feel like the level of abstraction that FieldCache is at is higher than that of the IndexReader (the lowest level). -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org