Putting selling rate in the index is OK for me, I also think that is a good idea.
The problem is: I don't know how to store the sell rate of the product that depends on a specific query Can you please give me your idea about how to store it in the Lucene document ? (field/value) Thank you very much, John Chris Hostetter wrote: > > > : I don't know what is the best way: > > that depends on your needs ... if Selling rate changes very infrequently, > or if you are dealing with teh sell rate for lots of books per > query then i'd put it in your index ... if it's constantly in flux and you > only care about the sell rate of one or two books for each query, doing it > at query time is fine. > > the definitions of "infrequently", "lots", and "constantly" all being > specific to the scope of your problem, and not something i can give > general advice on. > > : or doing something like you said: "adding an optional clauses to your > : query for each of your N productIds"... but I don't really know how to > do > : this... > : > : Any sample code exemple ? > > I suggest you start by looking at the javadocs for BooleanQuery. > > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Sorting-based-on-a-selling-rate-tf2175860.html#a6083872 Sent from the Lucene - Java Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]