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::Query::Allocations#process!
This is the main method of this class that will replace ids and count. What it does is calculate the ids and counts of its allocations for being used in the results. It also calculates the total Parameters: * amount: the amount of ids to calculate * offset: the offset from where in the result set to take the ids * terminate_early: Whether to calculate all allocations. Note: With an amount of 0, an offset > 0 doesn't make much sense, as seen in the live search. Note: Each allocation caches its count, but not its ids (thrown away). The ids are cached in this class. Note: It's possible that no ids are returned by an allocation, but a count. (In case of an offset)
Edit
git clone [email protected]:floere/picky.git
cd picky
open server/lib/picky/query/allocations.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Picky--Query--Allocations-process--for-pr
# Commit to gitgit add server/lib/picky/query/allocations.rbgit commit -m "better docs for Picky::Query::Allocations#process!"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Picky--Query--Allocations-process--for-pr
hub pull-request
# Celebrate!