webxdc / store

XDC store, migrated to codeberg
https://codeberg.org/webxdc/store
5 stars 0 forks source link

improve search results #75

Closed adbenitez closed 1 year ago

adbenitez commented 1 year ago

close #51

adbenitez commented 1 year ago

this is still not perfect, somehow the fuse.js lib doesn't really fit for searching matching words in a paragraph, we need to change the usage to split the description by space and do the matching in the word array, because location of the match in the string influences the score/threshold

Septias commented 1 year ago

What is the default threshhold?

adbenitez commented 1 year ago

What is the default threshhold?

https://fusejs.io/api/options.html#threshold

adbenitez commented 1 year ago

because location of the match in the string influences the score/threshold

default location is 0 (start of the string) so if you search for "cool" and it happens to be the last word in a long description it will have low score/threshold and probably not match, the solution is not to use big threshold because then results are really poor like in the attached image in the linked issue