Open jnguyenx opened 7 years ago
Ah--I thought you had nothing here (e.g. a blank boost line). Am I correct that you're actually inputting "NaN", as per your example?
Oops missed copy/paste, I edited the text.
Actually instead of having 1 as default boost, it can just be left without any boost, it's a valid query.
qf: [
"label_searchable^1",
"definition_searchable^1",
"synonym_searchable^1",
"iri_searchable^2",
"id_searchable^2",
"taxon_searchable"
],
Ah yes, that's a boog then--it should error earlier or give a default value. Playing with NaN a second ago:
> isNaN(NaN)
true
> isFinite(NaN)
false
> typeof(NaN)
'number'
> typeof(1)
'number'
> NaN/NaN
NaN
> 1/NaN
NaN
> 1/0
Infinity
That. Is. So. Wrong.
In the yaml config file, defined a field without any boost as:
boost_weights: taxon_searchable
will generate a query which is not valid, with boosting:
taxon_searchable^NaN
Ideally a default boosting of 1 should be present instead.