lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Pailet <9i7svel2zr6u...@jetable.org>
Subject Sorting based on a selling rate
Date Mon, 28 Aug 2006 08:10:20 GMT

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


Mime
View raw message