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 F2D80C2A8 for ; Wed, 18 Jul 2012 08:35:40 +0000 (UTC) Received: (qmail 77369 invoked by uid 500); 18 Jul 2012 08:35:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 77051 invoked by uid 500); 18 Jul 2012 08:35:37 -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 76946 invoked by uid 99); 18 Jul 2012 08:35:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 08:35:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.213.176 as permitted sender) Received: from [209.85.213.176] (HELO mail-yx0-f176.google.com) (209.85.213.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 08:35:26 +0000 Received: by yenl5 with SMTP id l5so1524589yen.35 for ; Wed, 18 Jul 2012 01:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=j8DaPg1QSS1lUHNQLrMlcSH+titavscWaEZR+qh3mXk=; b=PBXnijWW27BnTz1SXiVE407RTegu3KK0BgMyAIdD7se4VjkAZ1DOdDa9/AuBUbrmz4 EXeB7NgoUNhZ8ws1DH75Y3IOOOrqGXGWGl/v0H7Pa8VoFlkmBRYgvuRkeWrr1pgKPDbu HiF576xpKzcmXh4BFZJ60YAkzE1/LKSPamAhxJhdEw++TcstZvZgNlOFYWW4Hbn1MsHk jFgh+OxgC0bIqIj3c+TPwPOlsWR9zvwfMOkWF/4gEAzPraLZZlFSW8YILB5c0coB8KHV XRZHT69X2dAscl5ehNCVe1DfJOSirEAxl86MoahUh2Lzl0SDXWLRV8loMm25XdRnn2Eo uUyg== Received: by 10.50.89.169 with SMTP id bp9mr1141797igb.59.1342600505745; Wed, 18 Jul 2012 01:35:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.23.104 with HTTP; Wed, 18 Jul 2012 01:34:45 -0700 (PDT) In-Reply-To: <7256EF88AC164D61831C86D92A54289D@sv.us.sonicwall.com> References: <7256EF88AC164D61831C86D92A54289D@sv.us.sonicwall.com> From: Ian Lea Date: Wed, 18 Jul 2012 09:34:45 +0100 Message-ID: Subject: Re: Multiple sort field To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > Any thoughts on this? Patience ... > Is it good to use multiple sort fields? Absolutely, if that's what you need. On the other hand, if you don't need it then it's a bad idea. > Using sort on docid will consume any memory? Don't know. Certainly won't use less than not sorting this way. > Is there any other way out to acheive this. If you could get a full timestamp you could index it as a NumericField and sort on that. Or you could add some value to the existing timestamp to make each one unique. Probably other ways too but that's all I can think of right now. -- Ian. On Wed, Jul 18, 2012 at 6:34 AM, Ganesh wrote: > Any thoughts on this? > > Regards > Ganesh > > ----- Original Message ----- > From: "Ganesh" > To: > Sent: Tuesday, July 17, 2012 4:23 PM > Subject: [Bulk] Multiple sort field > > > Hello all, > > I have more than one record having same time stamp. When i sort by date t= ime in decending order, the set of records which have same time stamp are d= isplayed in the order of insertion. Basically it is displayed with asscendi= ng order of docid. But i want the reverse of that. > > Consider the below set of records. > record_1 201207170101 > record_2 201207170101 > record_3 201207170102 > record_4 201207170102 > > After search, it displays the results in below order > record_3 201207170102 > record_4 201207170102 > record_1 201207170101 > record_2 201207170101 > > But i want, sort on date time and again sort on docid in reverse order. > record_4 201207170102 > record_3 201207170102 > record_2 201207170101 > record_1 201207170101 > > Is it good to use multiple sort fields? Using sort on docid will consume = any memory? Is there any other way out to acheive this. > > Regards > Ganesh > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org