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::Backends::Backend#ids
Returns the result ids for the allocation.
Sorts the ids by size and & through them in the following order (sizes):
0. [100_000, 400, 30, 2]
1. [2, 30, 400, 100_000]
2. (100_000 & (400 & (30 & 2))) # => result
Note: Uses a C-optimized intersection routine (in performant.c)
for speed and memory efficiency.
Note: In the memory based version we ignore the amount and
offset hints.
We cannot use the information to speed up the algorithm,
unfortunately.Edit
git clone [email protected]:floere/picky.git
cd picky
open server/lib/picky/backends/backend.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Picky--Backends--Backend-ids-for-pr
# Commit to gitgit add server/lib/picky/backends/backend.rbgit commit -m "better docs for Picky::Backends::Backend#ids"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Picky--Backends--Backend-ids-for-pr
hub pull-request
# Celebrate!