IBM Cloudant Tutorials

Using the Primary Index

The primary index is the fastest way to retrieve data from your database. If you learn better by seeing a demonstration, watch these videos first:

Provision the IBM Cloudant Service in Bluemix

If you do not already have the IBM Cloudant service provisioned in Bluemix, follow these steps to provision the service. ▼More

Retrieve data

The primary index is fast because it comes with every Cloudant database, which means you don't have to write any code before you can use it. ▼More

Review the API Options

The generic _all_docs request above returns all the documents in the database. That's fine for this example database, but in a realistic scenario you'll probably want a more manageable result set. That's where API options come in. ▼More

As your data grows, you'll want to explore secondary indexes, which allow you to build additional indexes over your database, defined by efficient MapReduce views.

Find more videos and tutorials in the Cloudant Learning Center.