Is there a way in solr to get results according to some distribution of one of the indexed fields?
For example, imagine I have a catalog of books with the fields synopsis , publication_year and genre .
I would like to create a query that returns the most relevant results according to the synopsis review in favor of the most recent published books. However, in the final results (say 1000), I would like the genre to be distributed as close as possible to some given distribution. For example: 50% of science fiction, 25% of scientific literature, 10% of politics and so on.
I know that I could get a large set of results and do some weighted sampling from the tank to get the last 1000 books outside of solr, but I'm looking for a solution that would only be Solr.
Is this possible, and if so, how?
source share