Pagination / Filter

I’m using the Couchbase model gem for Ruby on Rails. Not sure about your setup.
That shouldn’t matter though. You need to create a view with a map function similar to below. I think this should create an index on the document price only for your “sullivan_products” in a given bucket.
They key is the product price and you can then pass in the options to sort by the key. It varies depending on which ORM you are using, but the idea should be the same.
function(doc, meta)
{
if (doc.type = “sullivan_product”)
{
emit(doc.price, null);
}
}
*I also recommend reading the Couchbase 2.0 manual from start to finish. It saves you tons of time in the end. I dedicated a day to read it all.