Skip to content

Instantly share code, notes, and snippets.

@daleharvey
Created September 30, 2020 09:43
Show Gist options
  • Save daleharvey/d42fc6b384157aade5f7ef409c01ba48 to your computer and use it in GitHub Desktop.
Save daleharvey/d42fc6b384157aade5f7ef409c01ba48 to your computer and use it in GitHub Desktop.
queryScorer.addDocument({
id: "fubar",
phrases: [
"home decor",
"home decoration",
"home decoration ideas",
"home decor stores"
]
})
console.log(queryScorer.score("home decor")[0])
> Object { document: {…}, score: Infinity }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment