> This might seem odd, but is it possible to use boost with > random ordering? > That is, documents that get boosted are more likely to > appear towards the > top of the ordering (I only display page 1, say 30 > documents). Does that > make sense? I'm assuming that random ordering is, well, > really random - so > then it's not possible. But I figured I'd ask. > > My problem is that I want to display a random assortment of > documents, but > unfortunately certain types of documents far outnumber > other types. So a > "random" assortment ends up with 50% type A, 50% type B, C, > D, E, F. So, I > was thinking I would essentially "boost" types B, C, D, E, > F until all types > are approximately evenly represented in the random > assortment. (Or > alternatively, if the user has an affinity for type B > documents, further > boost type B documents so that they're more likely to be > represented than > other types). > > Anyone know if there's a way to do something like this in > Solr?
Sounds like you want to achieve diversity of results. Consider using http://wiki.apache.org/solr/FieldCollapsing Alternatively you can make use of RandomSortField with function queries. http://lucene.apache.org/solr/api/org/apache/solr/schema/RandomSortField.html