Skip to content

Commit

Permalink
Add documentation on metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Stevens committed Nov 23, 2011
1 parent 771b285 commit f6b0c44
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,26 @@ Searches can be executed using the RiakClient::search() method

This method will return null unless executed against a Riak Search cluster.

## Meta Data ##
You can provide meta data on objects using RiakObject::getMeta() and RiakObject::setMeta()

# Set some new meta data
$object->setMeta("some-meta", "some-value");

# Get some meta data (returns null if not found)
$object->getMeta("some-meta");

# Get all meta data (an array keyed by meta name)
$object->getAllMeta()

Remove existing metadata

# Remove a single value
$object->removeMeta("some-meta");

# Remove all meta data
$object->removeAllMeta();

## Adding Secondary Indexes ##
Secondary indexes can be added using the RiakObject::addIndex() and RiakObject::addAutoIndex() methods.

Expand Down

0 comments on commit f6b0c44

Please sign in to comment.