Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 46315 invoked from network); 21 Jul 2004 17:41:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Jul 2004 17:41:38 -0000 Received: (qmail 6848 invoked by uid 500); 21 Jul 2004 17:41:31 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 6783 invoked by uid 500); 21 Jul 2004 17:41:31 -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 6753 invoked by uid 99); 21 Jul 2004 17:41:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [141.156.69.115] (HELO mail.infosciences.com) (141.156.69.115) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 21 Jul 2004 10:41:28 -0700 Received: from Aviran (unknown [141.156.69.109]) by mail.infosciences.com (Postfix) with ESMTP id C1CE7118412 for ; Wed, 21 Jul 2004 13:42:34 -0400 (EDT) From: "Aviran" To: "'Lucene Users List'" Subject: RE: Sort: 1.4-rc3 vs. 1.4-final Date: Wed, 21 Jul 2004 13:42:01 -0400 Message-ID: <006d01c46f4a$0a8c0cb0$6a00a8c0@Aviran> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal In-Reply-To: <20040721171233.80619.qmail@web51702.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I think I found the problem FieldCacheImpl uses WeakHashMap to store the cached objects, but since = there is no other reference to this cache it is getting released. Switching to HashMap solves it. The only problem is that I don't see anywhere where the cached object = will get released if you open a new IndexReader. Aviran -----Original Message----- From: Greg Gershman [mailto:greggersh@yahoo.com]=20 Sent: Wednesday, July 21, 2004 13:13 PM To: Lucene Users List Subject: RE: Sort: 1.4-rc3 vs. 1.4-final I've done a bit more snooping around; it seems that in FieldSortedHitQueue.getCachedComparator(line 153), calls to lookup a = stored comparator in the cache always return null. This occurs even for the built-in sort types (I tested it on integers and my code for longs). = The comparators don't even appear to be being stored in the HashMap to begin with. Any ideas? Greg =20 --- Aviran wrote: > Since I had to implement sorting in lucene 1.2 I had > to write my own sorting > using something similar to a lucene's contribution > called SortField. > Yesterday I did some tests, trying to use lucene 1.4 > Sort objects and I > realized that my old implementation works 40% faster > then Lucene's > implementation. My guess is that you are right and > there is a problem with > the cache although I couldn't find what that is yet. >=20 > Aviran >=20 > -----Original Message----- > From: Greg Gershman [mailto:greggersh@yahoo.com] > Sent: Wednesday, July 21, 2004 9:22 AM > To: lucene-user@jakarta.apache.org > Subject: Sort: 1.4-rc3 vs. 1.4-final >=20 >=20 > When rc3 came out, I modified the classes used for > Sorting to, in addition to Integer, Float and > String-based sort keys, use Long values. All I did > was add extra statements in 2 classes (SortField and > FieldSortedHitQueue) that made a special case for > longs, and created a LongSortedHitQueue identical to > the IntegerSortedHitQueue, only using longs. >=20 > This worked as expected; Long values converted to > strings and stored in Field.Keyword type fields > would > be sorted according to Long order. The initial > query > would take a while, to build the sorted array, but > subsequent queries would take little to no time at > all. >=20 > I went back to look at 1.4 final, and noticed the > Sort implementation has > changed quite a bit. I tried the same type of > modifications to the existing > source files, but was unable to achieve similiar > results. > Each subsequent query seems to take a significant > amount of time, as if the Sorted array is being > rebuilt each time. Also, I tried sorting on an > Integer fields and got similar results, which leads > me > to believe there might be a caching problem > somewhere. >=20 > Has anyone else seen this in 1.4-final? Also, I > would > like it if Long sorted fields could become a part of > the API; it makes sorting by date a breeze. >=20 > Thanks! >=20 > Greg Gershman >=20 >=20 > =09 > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > http://promotions.yahoo.com/new_mail >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org >=20 >=20 =09 =09 __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ --------------------------------------------------------------------- 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