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.

Source | Google | Stack overflow

Edit

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

cd picky

open server/lib/picky/backends/backend.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Picky--Backends--Backend-ids-for-pr


# Commit to git

git add server/lib/picky/backends/backend.rbgit commit -m "better docs for Picky::Backends::Backend#ids"


# 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--Backends--Backend-ids-for-pr

hub pull-request


# Celebrate!