Hi all,
I'm trying to order my CMIS query results by relevance using the score function, but it's not working as it should.
For instance, the results of this query:
SELECT D.cmis:name, SCORE() AS relevance FROM cmis:document as D WHERE CONTAINS(D,'test')) ORDER BY relevance DESC
Are not ordered by score:
"example test script.js.sample" 0.5994702577590942
"2_1995-00001_00001.pdf" 0.039295781403779984
"26_1995-00001_00001.pdf" 0.12414738535881042
"26_1998-00003_00001.pdf" 0.03449612110853195
"Alfresco_Enterprise_4_1_5_Administrator.pdf" 0.11594238877296448
Furthermore, if I add the path to the query, like this:
SELECT D.cmis:name, SCORE() AS relevance FROM cmis:document as D WHERE CONTAINS(D,'test')) AND CONTAINS(D, 'PATH:"/app:company_home/st:sites//*"') ORDER BY relevance DESC
The results are not only disordered, but the query is also returning score values greater than 1:
"2_1995-00001_00001.pdf" 1.0265105962753296
"26_1995-00001_00001.pdf" 1.0837550163269043
"26_1998-00003_00001.pdf" 1.0232725143432617
"Alfresco_Enterprise_4_1_5_Administrator.pdf" 1.0782195329666138
Is there anything that I'm doing wrong?
Thank you in advance!! Regards
I've found out that if I change from solr to lucene, score and order are correct... does it make sense??
Anyone help??
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.