summaryrefslogtreecommitdiff
path: root/lib/Net/Riak/Role/REST/Object.pm
diff options
context:
space:
mode:
authorMainframe2008 <thg.bot@gmail.com>2013-02-26 08:44:28 +0100
committerMainframe2008 <thg.bot@gmail.com>2013-02-26 08:44:28 +0100
commit1b442767f0bc92b98c3a398dde02dae6212ecd1c (patch)
tree103131ad787226886342fa39d44317ce9438c5e1 /lib/Net/Riak/Role/REST/Object.pm
parentAdd documentation for secondary indexes (diff)
downloadnet-riak-1b442767f0bc92b98c3a398dde02dae6212ecd1c.tar.gz
*Added secondary index support using method names from the riak python
client. * Added tests for secondary indexes * Added documentation
Diffstat (limited to 'lib/Net/Riak/Role/REST/Object.pm')
-rw-r--r--lib/Net/Riak/Role/REST/Object.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Net/Riak/Role/REST/Object.pm b/lib/Net/Riak/Role/REST/Object.pm
index 859e06b..545e4e0 100644
--- a/lib/Net/Riak/Role/REST/Object.pm
+++ b/lib/Net/Riak/Role/REST/Object.pm
@@ -103,8 +103,8 @@ sub populate_object {
$HTTP::Headers::TRANSLATE_UNDERSCORE = 0;
foreach ( $http_response->header_field_names ) {
- next unless /^X-Riak-Index-(.+_bin)/;
- $obj->i2index({ lc($1) => $http_response->header($_) })
+ next unless /^X-Riak-Index-(.+_bin)$/ || /^X-Riak-Index-(.+_int)$/;
+ $obj->add_index(lc($1), $http_response->header($_) )
}
$HTTP::Headers::TRANSLATE_UNDERSCORE = 1;