picky
https://github.com/floere/picky
HTML
Picky is an easy to use and fast Ruby semantic search engine that helps your users find what they are looking for.
Picky::Search#boost
Examples:
search = Search.new(books_index, dvd_index, mp3_index) do
boost [:author, :title] => +3,
[:title, :isbn] => +1
end
or
# Explicitly add a random number (0...1) to the boosts.
#
my_boosts = Class.new do
# Instance only needs to implement
# boost_for combinations
# and return a number that is
# added to the score.
#
def boost_for combinations
rand
end
end.new
search = Search.new(books_index, dvd_index, mp3_index) do
boost my_boosts
endEdit
git clone [email protected]:floere/picky.git
cd picky
open server/lib/picky/search.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Picky--Search-boost-for-pr
# Commit to gitgit add server/lib/picky/search.rbgit commit -m "better docs for Picky::Search#boost"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Picky--Search-boost-for-pr
hub pull-request
# Celebrate!