Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 61741 invoked from network); 29 Aug 2006 20:25:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Aug 2006 20:25:20 -0000 Received: (qmail 57534 invoked by uid 500); 29 Aug 2006 20:25:02 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 57504 invoked by uid 500); 29 Aug 2006 20:25:02 -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 57488 invoked by uid 99); 29 Aug 2006 20:25:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 13:25:02 -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 [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2006 13:25:02 -0700 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id B846A5B778; Tue, 29 Aug 2006 13:24:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id B24947F403 for ; Tue, 29 Aug 2006 13:24:41 -0700 (PDT) Date: Tue, 29 Aug 2006 13:24:41 -0700 (PDT) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Sort by Date In-Reply-To: Message-ID: References: <1cbd6f830608290850m58f8a46etb116fb2ca3682003@mail.gmail.com> <9ACB9C12-4A84-4743-B2ED-FDF0C48115A1@ehatchersolutions.com> <1cbd6f830608291254x2c8a2668l76fc3d78fc25ec08@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N : yyyymmdd so that it can be sorted. having done that, however, I am : unsure how to ask Lucene to sort on that date, but I'll figure it out : in time or someone will tell me. you don't need to wait ... it's already been explained in this thread, look at the Sort class and the methods in IdexSearcher which take Sort objects. : : On Aug 29, 2006, at 3:54 PM, Mag Gam wrote: : : > "Index the date". Do you mean, index date, or the document date? : > : > Could this be in a LIA book? : > : > : > : > On 8/29/06, Erik Hatcher wrote: : >> : >> : >> On Aug 29, 2006, at 11:50 AM, Mag Gam wrote: : >> > Is it possible to sort results by date of the document? : >> : >> Sure, check out the Sort class and the overloaded IndexSearcher.search : >> () methods that take a Sort. You will need to index the date in a : >> sortable way. DateTools provides handy methods for this purpose. : >> : >> Erik : >> : >> : >> --------------------------------------------------------------------- : >> 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 : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org