On Wed, Nov 20, 2013 at 3:48 PM, Kartik Thakore <[email protected]> wrote:
> Thank you. > > I am creating indexes with: > > curl -i -XPUT http://192.168.1.10:8098/yz/index/allLogs \ > -H 'content-type: application/json' \ > -d '{"schema" : "_yz_default", "bucket" : "logs" }' > > > But when I check the index with: > > curl -i http://192.168.1.10:8098/yz/index/allLogs > > It drops the bucket association > > HTTP/1.1 200 OK > Server: MochiWeb/1.1 WebMachine/1.10.5 (jokes are better explained) > Date: Wed, 20 Nov 2013 20:45:21 GMT > Content-Type: application/json > Content-Length: 41 > > {"name":"allLogs","schema":"_yz_default"} > Sorry, that documentation is out of date. To associate an index to a bucket you need to set the bucket's properties. curl -XPUT -H 'content-type: application/json' ' http://localhost:8098/buckets/logs/props' -d '{"props":{"yz_index":"allLogs"}}' You can perform a GET on that same resource to check the yz_index property is set. > Also > > what is going on here > > curl -XPUT -H'content-type:application/json' > http://localhost:8098/buckets/people/keys/me \ > -d'{ "name_s" : "kartik" }' > > Why not: > curl -XPUT -H'content-type:application/json' > http://localhost:8098/rial/people/me<http://localhost:8098/buckets/people/keys/me> > \ > -d'{ "name_s" : "kartik" }' > In Riak 1.0.0 we changed the resource from '/riak/<bucket>/<key>' to '/buckets/<bucket>/keys/<key>'. We were supposed to deprecate and eventually remove the old resource but we never did. You can still use the old style but I would recommend using the new style as it is what we use in official docs and there is a chance perhaps the old resources don't stay up to date with the latest features. -Z
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
