riak-client 2.0.0.rc2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c5f3295a8250149c86f2b932a13f015621d42e5
4
- data.tar.gz: 22dca3a33f295d67ada447302bcff4aed5bce2bf
3
+ metadata.gz: ad40ac9eb63589a4a5ec590cec005f72da1d5865
4
+ data.tar.gz: 728c720266417b1f07e0d2078b83deb49341e004
5
5
  SHA512:
6
- metadata.gz: d4299561b7b0bd8ee05ee6e1f776e2ca9039d36e09761de4ae0e8dab16ad13633ef2392f2254232dbb9aad5225b0b5f81fc6d49518f63aa2285c1188147e9e37
7
- data.tar.gz: 597699ef5a0f67ad7267d2cbce4524ca525639ebecc7475ed927b1f40b338d39857f1cf279362ff579cefe8ac09fbfdcd2643daddb3541c1b132ebda5e096185
6
+ metadata.gz: d74e7d77692280c40f0777b0c80dad5455592584e116f1ea12a9eeca2d53e14bd38b32cca201fafd15550767d305a13ae2127376c3fef4339204ed1d860f554f
7
+ data.tar.gz: 8073b45333abf60fb4965afea5eaca555b44761abe08089295f742d1bcd937c0ee8027319f0c65f3d86e0caf57cc63ae5b538430fc161d500939c885650045b2
data/README.markdown CHANGED
@@ -96,7 +96,7 @@ new_one.store
96
96
 
97
97
  ## Bucket Types
98
98
 
99
- Riak 2 uses [bucket types](http://docs.basho.com/riak/2.0.0pre11/dev/advanced/bucket-types/) to
99
+ Riak 2 uses [bucket types](http://docs.basho.com/riak/latest/dev/advanced/bucket-types/) to
100
100
  enable groups of similar buckets to share properties, configuration, and to namespace values
101
101
  within those buckets. Bucket type support is integral to how CRDTs work.
102
102
 
@@ -141,51 +141,33 @@ p results # => ["Please Please Me", "With The Beatles", "A Hard Day's Night",
141
141
 
142
142
  ## Riak Search Examples
143
143
 
144
- For more information about Riak Search, see [the Basho wiki](http://wiki.basho.com/Riak-Search.html).
144
+ This client supports the new Riak Search 2 (codenamed "Yokozuna"). For more information about Riak Search, see [the Riak documentation](http://docs.basho.com/riak/latest/dev/using/search/).
145
145
 
146
- ``` ruby
147
- # Create a client, specifying the Solr-compatible endpoint
148
- # When connecting to Riak 0.14 and later, the Solr endpoint configuration option is not necessary.
149
- client = Riak::Client.new :solr => "/solr"
150
-
151
- # Search the default index for documents
152
- result = client.search("title:Yesterday") # Returns a vivified JSON object
153
- # containing 'responseHeaders' and 'response' keys
154
- result['response']['numFound'] # total number of results
155
- result['response']['start'] # offset into the total result set
156
- result['response']['docs'] # the list of indexed documents
157
-
158
- # Search the 'users' index for documents
159
- client.search("users", "name:Sean")
160
-
161
- # Add a document to an index
162
- client.index("users", {:id => "sean@basho.com", :name => "Sean Cribbs"}) # adds to the 'users' index
163
-
164
- client.index({:id => "index.html", :content => "Hello, world!"}) # adds to the default index
165
-
166
- client.index({:id => 1, :name => "one"}, {:id => 2, :name => "two"}) # adds multiple docs
167
-
168
- # Remove document(s) from an index
169
- client.remove({:id => 1}) # removes the document with ID 1
170
- client.remove({:query => "archived"}) # removes all documents matching query
171
- client.remove({:id => 1}, {:id => 5}) # removes multiple docs
146
+ This documentation assumes there's a `yokozuna` bucket type created and activated.
172
147
 
173
- client.remove("users", {:id => "sean@basho.com"}) # removes from the 'users' index
174
-
175
- # Seed MapReduce with search results
176
- Riak::MapReduce.new(client).
177
- search("users","email:basho").
178
- map("Riak.mapValuesJson", :keep => true).
179
- run
180
-
181
- # Detect whether a bucket has auto-indexing
182
- client['users'].is_indexed?
183
-
184
- # Enable auto-indexing on a bucket
185
- client['users'].enable_index!
186
-
187
- # Disable auto-indexing on a bucket
188
- client['users'].disable_index!
148
+ ``` ruby
149
+ # Create a client and bucket.
150
+ client = Riak::Client.new
151
+ bucket = client.bucket 'pizzas'
152
+
153
+ # Create an index and add it to a typed bucket. Setting the index on the bucket
154
+ # may fail until the index creation has propagated.
155
+ client.create_search_index 'pizzas'
156
+ client.set_bucket_props bucket, {search_index: 'pizzas'}, 'yokozuna'
157
+
158
+ # Store some records for indexing
159
+ meat = bucket.new 'meat'
160
+ meat.data = {toppings_ss: %w{pepperoni ham sausage}}
161
+ meat.store type: 'yokozuna'
162
+
163
+ hawaiian = bucket.new 'hawaiian'
164
+ hawaiian.data = {toppings_ss: %w{ham pineapple}}
165
+ hawaiian.store type: 'yokozuna'
166
+
167
+ # Search the pizzas index for hashes that have a "ham" entry in the toppings_ss array
168
+ result = client.search('pizzas', 'toppings_ss:ham') # Returns a results hash
169
+ result['num_found'] # total number of results
170
+ result['docs'] # the list of indexed documents
189
171
  ```
190
172
 
191
173
  ## Secondary Index Examples
@@ -406,7 +388,7 @@ in the `lib/riak/crdt` directory.
406
388
 
407
389
  ## Riak 1.4 Counters
408
390
 
409
- For more information about counters in Riak, see [the Basho wiki](http://docs.basho.com/riak/latest/dev/references/http/counters/).
391
+ For more information about 1.4-style counters in Riak, see [the Basho documentation](http://docs.basho.com/riak/latest/dev/references/http/counters/).
410
392
 
411
393
  Counter records are automatically persisted on increment or decrement. The initial default value is 0.
412
394
 
@@ -488,7 +470,7 @@ That's about it. PN Counters in Riak are distributed, so each node will receive
488
470
 
489
471
  ## License & Copyright
490
472
 
491
- Copyright ©2010-2012 Sean Cribbs and Basho Technologies, Inc.
473
+ Copyright ©2010-2014 Sean Cribbs and Basho Technologies, Inc.
492
474
 
493
475
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
494
476
 
data/lib/riak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Riak
2
- VERSION = "2.0.0.rc2"
2
+ VERSION = "2.0.0"
3
3
  end
data/riak-client.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.add_development_dependency 'simplecov', '~> 0.8.2'
23
23
 
24
24
  gem.add_runtime_dependency "i18n", ">=0.4.0"
25
- gem.add_runtime_dependency "beefcake", ">= 1.0.0.pre1"
25
+ gem.add_runtime_dependency "beefcake", "~> 1.0"
26
26
  gem.add_runtime_dependency "multi_json", "~>1.0"
27
27
  gem.add_runtime_dependency "innertube", "~>1.0.2"
28
28
  gem.add_runtime_dependency 'cert_validator', '~> 0.0.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Cribbs
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-02 00:00:00.000000000 Z
12
+ date: 2014-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -99,16 +99,16 @@ dependencies:
99
99
  name: beefcake
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 1.0.0.pre1
104
+ version: '1.0'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 1.0.0.pre1
111
+ version: '1.0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: multi_json
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -336,12 +336,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
336
336
  version: 1.9.3
337
337
  required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  requirements:
339
- - - ">"
339
+ - - ">="
340
340
  - !ruby/object:Gem::Version
341
- version: 1.3.1
341
+ version: '0'
342
342
  requirements: []
343
343
  rubyforge_project:
344
- rubygems_version: 2.2.0
344
+ rubygems_version: 2.3.0
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: riak-client is a rich client for Riak, the distributed database by Basho.