Discovered today during BwM session.
If I run parse on the same query in the shell it looks like it converts the boost into scientific notation.
In [7]: from documentcloud.users.models import User
...: u = User.objects.get(username="sanjin")
...: qd = QueryDict('hl=true&version=2.0&per_page=25')
...: result = s._parse('"death" AND "taser"^50', qd, user=u)
...: print(result)
('"death" AND "taser"^5E+1', <QueryDict: {}>, None, False, False)
I think what's happening here is
User types "taser"^50
luqum parses it, Decimal(50).normalize() → 5E+1
Solr gets "taser"^5 (boost of 5 on taser) plus a mystery term E+1 which is passed to the highlighter
Discovered today during BwM session.
If I run parse on the same query in the shell it looks like it converts the boost into scientific notation.
In [7]: from documentcloud.users.models import User
...: u = User.objects.get(username="sanjin")
...: qd = QueryDict('hl=true&version=2.0&per_page=25')
...: result = s._parse('"death" AND "taser"^50', qd, user=u)
...: print(result)
('"death" AND "taser"^5E+1', <QueryDict: {}>, None, False, False)
I think what's happening here is
User types "taser"^50
luqum parses it, Decimal(50).normalize() → 5E+1
Solr gets "taser"^5 (boost of 5 on taser) plus a mystery term E+1 which is passed to the highlighter