I think you could use boosting queries: for group A you boost one category and for group B some other category.
----- Mensaje original ----- De: "Snubbel" <solrforum.20.x...@spamgourmet.com> Para: solr-user@lucene.apache.org Enviados: Jueves, 26 de Septiembre 2013 8:01:36 Asunto: Sorting dependent on user preferences with FunctionQuery Hello, I want to present to different user groups a search result in different orders. Say, i have customer group A, which I know prefers Books, I want to get Books at the top of my query result, DVDs at the bottom. And for group B, preferring DVD, these first. In my index I have a field of type text named "category" with values Book and DVD. I thought maybe I could solve this with QueryFunctions, maybe like this: select?q=*%3A*&sort=query(qf=category v='Book')desc but Solr returns "Can't determine a Sort Order (asc or desc) in sort". What is wrong? I tried different ways of formulating the query without success... Or, does anyone have a better idea how to solve this? Best regards, Nikola -- View this message in context: http://lucene.472066.n3.nabble.com/Sorting-dependent-on-user-preferences-with-FunctionQuery-tp4092119.html Sent from the Solr - User mailing list archive at Nabble.com. ________________________________________________________________________________________________ III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu ________________________________________________________________________________________________ III Escuela Internacional de Invierno en la UCI del 17 al 28 de febrero del 2014. Ver www.uci.cu