Java Documentation
Hi, so I'm completely new to Couch and figured I'd try and give it a spin, but I'm hitting a bit of a brick wall here with the documentation. Maybe I am missing something, but it feels like some pretty key things are missing. Going by the tutorial it feels like I'm just using a key-value store. Maybe I'm just blind and all the information is there, but there are a few things I'm missing:
How do I define a JSON document? Then, what can I do with them besides throwing them in the database?
How do I query the data? I'm not expecting SQL, but surely there's more than just retrieving by key?
How do I create views, and what can I do with them programmatically ?
How do I do map/reduce? Example problem I've seen elsewhere: the database stores a set of strings containing sentences, generate a wordcount for each word in all of the sentences.
Sorry if any of this should be obvious/basic, I am just starting out and could use some help!
OH. That's why the (1.8) documentation had nothing about views. I went with 1.8 since I assumed that it was the stable release version. I was just reading it and thinking "I'm pretty sure CouchDB is meant to have some JSON somewhere." So I take it 1.8 was more Membase and less Couch?
But anyway, looking at the 2.0 docs, there is more information but it's not what I would consider extensive. How much of the stuff from CouchDB is transferable? Would it work if I read the existing CouchDB documentation and just pretended that it was for Couchbase?
The 2.0 docs will be updated before the official release. As for CouchDB... Some concepts are certainly transferable. The HTTP API and Map/Reduce views should feel quite similar. But keep in mind that Couchbase Server is still a distributed key/value store with document store features, so in terms of application architecture, there will be some differences with CouchDB.
Which version of the client and server are you using? If you're using 1.8, then view support isn't implemented. Couchbase Server Developer Preview 3 has view support. You can find more info on creating views here - http://www.couchbase.com/couchbase-server/next.