Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 68276 invoked from network); 18 Feb 2006 08:39:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Feb 2006 08:39:34 -0000 Received: (qmail 86994 invoked by uid 500); 18 Feb 2006 08:39:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 86958 invoked by uid 500); 18 Feb 2006 08:39:29 -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 86947 invoked by uid 99); 18 Feb 2006 08:39:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2006 00:39:29 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.87.59] (HELO web37406.mail.mud.yahoo.com) (209.191.87.59) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 18 Feb 2006 00:39:28 -0800 Received: (qmail 35027 invoked by uid 60001); 18 Feb 2006 08:39:07 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=a3sy2Pwa0J9za8yz0TQcYBekinBlD/1K2q3Zd7kMw7KAMFGGncvjTttHnBwzApO04EgPzAicjbAwopiY6xzS0lPIS75XkTAmOXuO4l3MERASrh0BHoV9jbqQ9EoCIYu2gXCXjyT+ddFCsZzc5OXuHOUlFz0vOdIeR57DKWZ3LsQ= ; Message-ID: <20060218083907.35025.qmail@web37406.mail.mud.yahoo.com> Received: from [58.65.140.3] by web37406.mail.mud.yahoo.com via HTTP; Sat, 18 Feb 2006 08:39:07 GMT Date: Sat, 18 Feb 2006 08:39:07 +0000 (GMT) From: SOME ONE Subject: Re: Custom Sorting To: java-user@lucene.apache.org In-Reply-To: <43F6165C.7080003@curtin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Yes, I could run two searches, but that means running two searches for each request from user and that I think doubles the job taking double time. Any suggestions to do it more efficiently please ? Thanks and Regards Wiseman --- "Michael D. Curtin" wrote: > SOME ONE wrote: > > > Hi, > > > > I am using MultiFieldQueryParser (Lucene 1.9) to > > search title and body fields in the documents. The > > requirement is that documents with title match > should > > be returned before the documents with body match. > > Using the default scoring, title matches do come > > before the body matches. But, I also need the > > documents with title matches sorted by date, and > > documents with body matches sorted by date. i.e > there > > will be two groups of docs in the results, one > with > > title match and the other with just body match, > the > > first group of docs should come before the second > > group, and each group should be sorted by date. > > > I am not concerned with the Lucene scoring as the > > documents are very short. So, I think, just two > scores > > as described above for the two groups of docs are > > sufficient. I am new to Lucene and have been looking > > into its code trying to figure out how to achieve > the > > desired behaviour but can't seem to. > > > Any help in this regard will be greatly appreciated. > > Would it work to run 2 searches, one with only the > title criteria and then > another with only the body criteria? > > --MDC > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: > java-user-help@lucene.apache.org > > Send instant messages to your online friends http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org