Hacker News new | ask | show | jobs
by boomzilla 4705 days ago
Hardcoding your scoring function here is a bad, bad idea:

https://github.com/ankane/searchkick/blob/master/lib/searchk...

Just curious, how many docs are you indexing?

2 comments

I'm curious about this "bad, bad idea" theory too. For our site, I have a handful of hard-coded scoring functions that the site can select from based on search context, and it's far more supportable and debuggable than some of the dynamic query assembly approaches I've tried in the past.

ElasticSearch is a wonderful product that is a real pain to tune, so I'm curious if there's a better approach I'm missing.

We're indexing around 100k documents. What line are you referring to, and what's bad about it?