: Ok, for the sort object, but my problem is I don't know haox to retrieve (or : store) information of the sell rate of the products (the sell rate deponds : on the QUERY ! The sort is different for each queries.) : : I imagine to connect to the DB and get sell rate of products for this : specific query... but connecting to DB at each query is not a right choice : ;-)
I'm sorry .. i missunderstood your question ... rereading it now here is what i sounds like you are saying: When a user tells gives you a search term they are interested in, you have an external system that that you use to look up the top N selling books matching those terms, and what their sell rate is. you would like to do a search across your entire lucene index, having those N products score higher based on their sell rate. (which is not in the index) ...assuming i have that right, try adding an optional clauses to your query for each of your N productIds, with a boost which is proportionate to the sell rate. the exact boost values should be based on how importnat you want the sell rate to be compared with with the textual relevancy of the query term. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]