Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 12859 invoked from network); 28 Aug 2006 08:10:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 08:10:54 -0000 Received: (qmail 40309 invoked by uid 500); 28 Aug 2006 08:10:46 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 40281 invoked by uid 500); 28 Aug 2006 08:10:45 -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 40247 invoked by uid 99); 28 Aug 2006 08:10:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 01:10:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 01:10:41 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GHcCK-0000y7-La for java-user@lucene.apache.org; Mon, 28 Aug 2006 01:10:20 -0700 Message-ID: <6016090.post@talk.nabble.com> Date: Mon, 28 Aug 2006 01:10:20 -0700 (PDT) From: John Pailet <9i7svel2zr6uujn@jetable.org> To: java-user@lucene.apache.org Subject: Sorting based on a selling rate MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I want to implement a specific search based on a selling rate. Let me explain this: I have a book collection in my store. I index my books like that: - One Lucene Document by book - Two Lucene Fields in the document - TITLE OF THE BOOK - KEYWORDS OF THE BOOK The keyword field is a BOOSTED field (* 1000) This is working fine :-) Now, I would like to search and sort my books according to the selling rate of the book. Exemple: If the user search for: "Java", the first books that lucene will return must be the best sellers books based on this specific search: "Java" If the user search for "Java and .net", the first books that lucene will return must bze the best sellers books based on this specific search: "Java and .net" For each query, I have a programm that records the product selling rate based on the specifiq query. For exemple: Query: "Java" -> [ProductId:123, rate: 23%], [ProductId:222, rate: 15%], [ProductId:567, rate: 7%]... Query: "Java and .net" -> [ProductId:99, rate: 45%], [ProductId:194, rate: 30%], [ProductId:93, rate: 10%]... How can I return books based on the selling rate (for a specific query) Must I developp a specifiq handler after the basic Lucene search and sort it programmatically, or is it possible to implement a mechanism at Index or search time ? Thank you for your help and sorry for my bad english ;-) John -- View this message in context: http://www.nabble.com/Sorting-based-on-a-selling-rate-tf2175860.html#a6016090 Sent from the Lucene - Java Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org