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
  end

Source | Google | Stack overflow

Edit

git clone [email protected]:floere/picky.git

cd picky

open server/lib/picky/search.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Picky--Search-boost-for-pr


# Commit to git

git add server/lib/picky/search.rbgit commit -m "better docs for Picky::Search#boost"


# Open pull request

gem 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!