Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a default boost value #2

Open
jnguyenx opened this issue Sep 16, 2016 · 3 comments
Open

Set a default boost value #2

jnguyenx opened this issue Sep 16, 2016 · 3 comments

Comments

@jnguyenx
Copy link
Contributor

jnguyenx commented Sep 16, 2016

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.

@kltm
Copy link
Member

kltm commented Sep 16, 2016

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?

@jnguyenx
Copy link
Contributor Author

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"
],

@kltm
Copy link
Member

kltm commented Sep 16, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants