Gravatar for jpdery@coveo.com

Question by jpdery, Jun 25, 2014 5:20 PM

error using negative modifier with $qre

Expression used:

$qre(expression:'@llanguagecode==("en") OR @llanguagecountrycode==("en")', modifier:-100)

Error I get is :

"[12.86] failure: `)' expected but `-' found"

This works:

$qre(expression:'@llanguagecode==("en") OR @llanguagecountrycode==("en")', modifier:100)

Am I missing something?

1 Reply
Gravatar for glaporte@coveo.com

Answer by Gregory Laporte, Jun 25, 2014 5:22 PM

Have you tried using the following?: $qre(expression:'@llanguagecode==("en") OR @llanguagecountrycode==("en")', modifier:'-100')

Gravatar for jpdery@coveo.com

Comment by jpdery, Jun 25, 2014 5:41 PM

Resolved. So easy…

Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, Jun 26, 2014 3:24 AM

Still a bug, I've filed #47094 for that. I'll have a look soon.

Gravatar for apare@coveo.com

Comment by Alexandre Paré, Jun 26, 2014 7:47 AM

Note that the score can't be negative so if two result have 30 and 25 as score, they will have the same rank at 0.

Ask a question