FacileSearch
Simple search with inverted index.
(Index data is stored in the Redis.)
Installation
Add this line to your application's Gemfile:
gem 'facile_search'
And then execute:
$ bundle
Or install it yourself as:
$ gem install facile_search
Usage
Create inverted index object.
meta_data = FacileSearch::MetaData.new(namespace: "example_index", text_field: "text", id_field: "id")
index = FacileSearch::InvertedIndex.new(meta_data)
Indexing and search.
sample = Struct.new(:id, :text).new(1, "some text")
index.indexing(sample) # => "OK"
index.search("text") # => [1]
Contributing
- Fork it ( https://github.com/i2bskn/facile_search/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request