views

April 22, 2014

Couchbase .NET SDK 2.0 Development Series: New View Querying Syntax

A core goal of the new Couchbase .NET SDK is improving the developer experience. We are working to achieve this goal in several ways:

Read more »

March 7, 2014

Couchbase .NET Client 1.3.4 Released!

This release is another bug fix/stability release concentrating on improving the retry algorithm for Views and adding more refined logging to the client, along with a few other miscellaneous fixes.

Read more »

October 1, 2013

Pagination with Couchbase

[This blog was syndicated from http://blog.grallandco.com]

 

If you have to deal with a large number of documents when doing queries against a Couchbase cluster it is important to use pagination to get rows by page. You can find some information in the documentation in the chapter "Pagination", but I want to go in more details and sample code in this article.
 

For this example I will start by creating a simple view based on the beer-sample dataset, the view is used to find brewery by country:

function (doc, meta) {
  if (doc.type == "brewery" && doc.country){
   emit(doc.country);
  }
}


 

This view list all the breweries by country, the index looks like:

Doc id Key Value
bersaglier Argentina null
cervecera_jerome Argentina null
brouwerij_nacional_balashi Aruba null
australian_brewing_corporation Australia null
carlton_and_united_breweries Australia null
coopers_brewery Australia null
foster_s_australia_ltd Australia null
gold_coast_brewery Australia null
lion_nathan_australia_hunter_street Australia null
little_creatures_brewery Australia null
malt_shovel_brewery Australia null
matilda_bay_brewing Australia null
... ... ...
... ... ...
... ... ...
yellowstone_valley_brewing United States null
yuengling_son_brewing United States null
zea_rotisserie_and_brewery United States null
fosters_tien_gang Viet Nam null
hue_brewery Viet Nam null

So now you want to navigate in this index with a page size of 5 rows.

Read more »

August 14, 2013

Using Map and Reduce View for Ranking

Starting from version 2.0, Couchbase server offers a powerful way of creating indexes for JSON documents through the concept of views.

Read more »

July 25, 2013

Caching queries in Couchbase for high performance

Starting from version 2.0, Couchbase server offers a powerful way of creating indexes for JSON documents through the concept of views.

Read more »

May 23, 2013

Couchbase @ Ziniki : The odyssey to find “Find”

Ziniki Infrastructure Systems built their integration tier on top of Couchbase, because the combination of document storage with incremental mapreduce gave them a powerful way to query data. In this blog, Gareth Powell, founder and architect at Ziniki, describes his experience of using mapreduce views in Couchbase. 

Read more »

October 23, 2012

Using C# Domain Objects to Define Couchbase Views

The Couchbase Client Library 1.2-Beta includes a new API for some basic cluster management.  There are methods for creating, removing and listing buckets.  There are similar methods for managing design documents.  These new features are found in the new class CouchbaseCluster, under the Couchbase.Management namespace.  The main benefit of this new API is that it's now possible to allow your application to create its bucket and set its design documents when it starts up. 

Read more »

September 20, 2012

Strongly Typed Views with the .NET Client Library

The latest bits of the Couchbase .NET Client Library support a few different view querying options.  In this post, I'll describe those options in detail.  To play along at home, make sure you have the latest Couchbase Server installed with the beer-sample sample bucket. 

I've added a view named "by_name" to the beer-sample bucket in the "beer" design doc.  This view simply creates a secondary index on the "name" property of "beer" documents.

Read more »