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 243B04DC4 for ; Mon, 9 May 2011 10:32:42 +0000 (UTC) Received: (qmail 61845 invoked by uid 500); 9 May 2011 10:32:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 61809 invoked by uid 500); 9 May 2011 10:32:39 -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 61801 invoked by uid 99); 9 May 2011 10:32:39 -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 10:32:39 +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.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 10:32:32 +0000 Received: by iym1 with SMTP id 1so6561015iym.35 for ; Mon, 09 May 2011 03:32:11 -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:content-transfer-encoding; bh=vaX9YZNGvE3mKkPA3HB+Xb8bX1xBmbp50wAGsBzksSc=; b=eGaYdFgbUnbINKPSnUlUDlYvE+kkllZG5fcXJQwmd8CdwZsgp2ZXZFSaPlEzU5LiQl q05AXikfbj6yEe+UPWvVJnogqqmn/F+utgOs1HPFuDdM3MrsKkjICBBG0hxxvYyrubne HL/ozQQox5Od+I+9/ZxxIXjve6QbfQnd9AKKc= 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:content-transfer-encoding; b=miazPDApKMupAXqGZnTu8cUTOcsW32kPsbQs2rozBKy4cMUXf+mUr7d8MaPY43x4Ac hRSUZDTIkFUf1xyNiL29MTdowu3LVyl5ClNEnID3pdZ98IkK3nvVUHknujeIa2ur+p/t kzOA/uFhDgVwln0lVLkQP5jVZ0NBxSPZth7vQ= Received: by 10.231.253.4 with SMTP id my4mr4434287ibb.153.1304937131145; Mon, 09 May 2011 03:32:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.207.80 with HTTP; Mon, 9 May 2011 03:31:51 -0700 (PDT) In-Reply-To: References: From: Ian Lea Date: Mon, 9 May 2011 11:31:51 +0100 Message-ID: Subject: Re: How do I sort lucene search results by relevance and time? To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Well, you can use one of the sorting search methods and pass multiple sort keys including relevance and a timestamp. But I suspect the Google algorithm may be a bit more complex than that. One technique is boosting: set an index time document boost on recent documents. Of course what is recent today may not be next week. There are other, more complex ways of customizing lucene scoring. A Google search for something like "customized lucene scoring" will find lots of info, some recent, some older, but probably all relevant one way or another. -- Ian. On Mon, May 9, 2011 at 4:59 AM, Johnbin Wang wrote= : > What do I want to do is just like Google search results. =A0The results i= n the > first page is the most relevant and also recent documents, but not > absolutely sorted by =A0time desc. > > -- > cheers, > Johnbin Wang > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org