Gravatar for dan@getfishtank.ca

Question by Dan Cruickshank, Aug 27, 2016 8:50 AM

Combining QRF with Q causes ranking function document score of 0

We're using a query ranking function for distance. We can validate it's document score of 600 being under "rankingFunctions" in the document score breakdown.

However, when we pass in a query, our "rankingFunctions" is set to zero. While our query is more complex (more filtering), the example in the documentation shows a query term and a QRF used at the same time so I'm assuming this is possible.

To recap - when q: has a value the rankingFunctions returns a 0. when q: is not rankingFunctions returns the proper score. Many thanks!

q:(words)

aq:((@syssource==("Coveo_web_index - WIN-017IQL30KGP") (@fz95xtemplate33381=="0EA399413A1841AF8478032E1B01D11E") NOT @ftemplateid33381==("adb6ca4f-03ef-4f47-b9ac-9ce2ba53ff97","fe5dd826-48c6-436d-b87a-7c4210c7413b"))) ($qrf(expression:'-sqrt(dist(@fgeocodez32xlatitude33381, @fgeocodez32xlongitude33381,31.230416,121.473701))', normalizeWeight: true)) (NOT @fz95xid33381="e97547e1c77b4bd38f1cff9cc4796ad9")

cq:(@fz95xlanguage33381=="en" @fz95xlatestversion33381=="1")

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Aug 29, 2016 8:26 AM

Hi Dan :)

I tried a similar setup on my side, and I am replicating what you are experiencing there.

I have no idea what is happening, I will speak to the team that takes care of this part and get back to you went I get more information.

What version of Coveo are you using?

FLG

Gravatar for dan@getfishtank.ca

Comment by Dan Cruickshank, Aug 29, 2016 11:06 AM

CES 7.0 x64 Build 8225.0 Coveo for Sitecore 3.0.1266.0

Gravatar for flguillemette@coveo.com

Comment by François Lachance-Guillemette, Aug 29, 2016 4:00 PM

I have done some more testing, and I have Ranking Function set to 0 only if I have 1 document back from my results, or if all the documents have the same ranking function value (in your case, if they are exactly at the same geographic location)

The ranking function is computed using the maximum and minimum values for the ranking function when the "normalizeWeight" parameter is set to true, which means the ranking function on only one document has no impact, and it is expected to work that way.

Do you have only one document when searching for specific word(s) with more filtering, or do they have all the same values?

0 Reply
Ask a question