Hi MOuli, AFAIK (and I don't know that much about Solr), this feature does not exist out of the box in Solr. One way to achieve this could be to construct a DocSet with topoffer:true and intersect it with your result DocSet, then select the first 5 off the intersection, randomly shuffle them, sublist [0:5], and move the sublist to the top of the results like QueryElevationComponent does. Actually you may want to take a look at QueryElevationComponent code for inspiration (this is where I would have looked if I had to implement something similar).
-sujit On Wed, 2011-09-21 at 06:54 -0700, MOuli wrote: > Hey Community. > > I got a Lucene/Solr Index with many offers. Some of them are marked by a > flag field "topoffer" that they are top offers. Now I want so sort randomly > 5 of this offers on the top. > > For Example > HTC Sensation > - topoffer = true > HTC Desire > - topoffer = false > Samsung Galaxy S2 > - topoffer = ture > IPhone 4 > - topoffer = true > ... > > When i search for a Handy then i want that first 3 offers are HTC Sensation, > Samsung Galaxy S2 and the iPhone 4. > > > Does anyone have an idea? > > PS.: I hope my english is not to bad > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Sort-five-random-Top-Offers-to-the-top-tp3355469p3355469.html > Sent from the Solr - User mailing list archive at Nabble.com.