01-20-2017 07:03 AM
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
01-20-2017 08:38 AM
I've found out that if I change from solr to lucene, score and order are correct... does it make sense??
01-24-2017 07:38 AM
Anyone help??
Explore our Alfresco products with the links below. Use labels to filter content by product module.