Guru (I thought my first name was OK.... until now), Have you tried using boosts for that? You can boost individual Document Fields when indexing, and/or you can boost individual Documents, thus giving some more and some less 'weight', which will have an effect on the final score.
Otis --- Gurukeerthi Gurunathan <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like some suggestions on the following scenario. > Say I have an index with a stored, indexed field called > 'weight'(essentially an int stored as string). I'd like to sort in > descending order of final weight, the search results by performing a > calculation involving the lucene score for each hits. For our > discussion, the calculation can be as simple as multiplying the > lucene > score with the value from the field 'weight' to get final weight. The > search results can run into thousands of documents. Though finally I > may > need only the top X number of documents, I wouldn't know what the top > X > would be until I perform this calculation and sort it. > The obvious way is to do a post processing of the hits iterator, > storing it in memory, performing this calculation and sorting it. Is > there any other better solution for this? > > Thanks, > Guru. > > > ********************************* > Gurukeerthi Gurunathan > Third Pillar Systems > San Mateo, CA > 650-372-1200x229 > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
