-
Notifications
You must be signed in to change notification settings - Fork 49
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
Most relevant search results #142
Comments
Ugh! I completely missed this… 😭 @backorder I assume it's not relevant anymore? |
@floere any help is always welcomed, even a year or so later! 😃 |
@backorder It's not a full answer, but for now… Picky primarily does boosting of certain result category combinations. Here are the docs for it: http://florianhanke.com/picky/documentation.html#search-options-boost (in your case, you'd boost one category more than the other). |
Both There are only two
The current
|
How would you implement most relevant search results? The follow code is using sort_by with some success but is somehow limited. Trying to use sort to have two elements to compare is difficult because it returns two Allocation containing terms. No idea what to do with those.
Perhaps Picky already has something for that? In any case, I would like to sort results by most relevant, then uri, then body. It would be useful to be able to do some kind of sort { |a, b| ... } to compared two elements.
The code below prioritize the uri containing the term. Could be an interesting example for the manual #140.
The text was updated successfully, but these errors were encountered: