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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]