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::Category#initialize
Parameters: * name: Category name to use as identifier and file names. * index: Index to which this category is attached to. Options: * partial: Partial::None.new, Partial::Substring.new(from:start_char, to:up_to_char) (defaults from:-3, to:-1) * similarity: Similarity::None.new (default), Similarity::DoubleMetaphone.new(amount_of_similarly_linked_words) * from: The source category identifier to take the data from. * key_format: What this category's keys are formatted with (default is :to_i) * backend: The backend to use. Default is Backends::Memory.new. Other options are: Backends::Redis.new, Backends::SQLite.new, Backends::File.new. * qualifiers: Which qualifiers can be used to predefine the category. E.g. "title:bla". Advanced Options: * source: Use if the category should use a different source. * tokenize: Whether to use the tokenizer (default is true). * tokenizer: Use a subclass of Tokenizers::Base that implements #tokens_for and #empty_tokens. * weight: Weights::Logarithmic.new, Weights::Constant.new(int = 0), Weights::Dynamic.new(&block) or an object that responds to #weight_for(amount_of_ids_for_token) and returns a float.
Edit
git clone [email protected]:floere/picky.git
cd picky
open server/lib/picky/category.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Picky--Category-initialize-for-pr
# Commit to gitgit add server/lib/picky/category.rbgit commit -m "better docs for Picky::Category#initialize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Picky--Category-initialize-for-pr
hub pull-request
# Celebrate!