Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

API to create view

2 replies [Last post]
  • Login or register to post comments
Thu, 04/05/2012 - 00:10
divyapt
Offline
Joined: 03/06/2012
Groups: None

Hi,

Is there any java API or any other means to create a view other than doing it manually via console ?

Thanks & Regards,
Divya

Top
  • Login or register to post comments
Thu, 04/12/2012 - 12:33
mvgetz
Offline
Joined: 04/12/2012
Groups: None

- Creating Views ------

Divya,

I am a newbie to couchbase but found that the view is simply a document with a special _id and format. So I simply format it correctly and then use the save document command in my API of choice. Here is a sample view:
{
"_id": "_design/application",
"_rev": "1-C1687D17",
"views": {
"viewname": {
"map": "function(doc) { ... }",
"reduce": "function(keys, values) { ... }"
}
}
}

Here is a link that I have found quite helpful though it was written for CouchDB - http://guide.couchdb.org/editions/1/en/cookbook.html
Thanks.
Mark

Top
  • Login or register to post comments
Thu, 12/20/2012 - 10:14
kyle.sama
Offline
Joined: 11/26/2012
Groups: None

I've been looking for this too, looks like a good option is to use the rest interface:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-desig...

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker