README.md in ngt-0.1.0 vs README.md in ngt-0.1.1

- old
+ new

@@ -1,13 +1,19 @@ # NGT [NGT](https://github.com/yahoojapan/NGT) - high-speed approximate nearest neighbors - for Ruby +[![Build Status](https://travis-ci.org/ankane/ngt.svg?branch=master)](https://travis-ci.org/ankane/ngt) + ## Installation -First, [install NGT](https://github.com/yahoojapan/NGT/blob/master/README.md#Installation). +First, [install NGT](https://github.com/yahoojapan/NGT/blob/master/README.md#Installation). For Homebrew, use: +```sh +brew install ngt +``` + Add this line to your application’s Gemfile: ```ruby gem 'ngt' ``` @@ -49,11 +55,11 @@ ``` Load an index ```ruby -Ngt::Index.new(path) +index = Ngt::Index.new(path) ``` Get an object by id ```ruby @@ -94,11 +100,10 @@ query = objects[0] result = index.search(query, size: 3) result.each do |res| puts "#{res[:id]}, #{res[:distance]}" - object = index.object(res[:id]) - p object + p index.object(res[:id]) end ``` ## Data