The just send you back to same page !!
Hi, can you point me towards the specific link that you're referencing and where you're selecting it from? I just checked through and couldn't find anything wrong...
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overviewCall or email "sales -at- couchbase-dot- com" today!
I think robtindall referred to this page: http://www.couchbase.org/code/couchbase/java/2.0.0
I'm new to Couchbase and interested in 2.0 and still evaluating it and still hunting for java client guide.
Thanks Edy. My apologies for not immediately understanding...is there a link off of that page that is not working properly?
Right hand side on the page under "Documentation", all the links are going to "#".
OH! So sorry, I'll get that addressed ASAP.
Hi Perry in the absence of the docs could you answer two question for me ?
1. Is it possible to specify a transcoder when querying a view ?
2. Is it possible to programatically create a view using the java spymemcache api
1. There is currently no support for using a transcoder when querying a view. Can you provide a use case for why you would want this? I might be able to add support.
2. There is no way to easily programmatically create a view in through the api. We chose to do this because we felt that views should really be created through the Couchbase web ui and also because when creating a view it can take a variable amount of time to create the initial index and there isn't currently a good way to know when the view is ready to be queried. When I was writing test cases for the java api I had to write some code so I could do this and I have to say that creating views through the client is a big pain. I would recommend against it, but if you would like to do it take a look at the TestingClient class in src/test/java/net/spy/memcached/couch. You could extend the CouchbaseClient class and copy some of the code from this class into the extended CouchbaseClient class. Also, what benefit do you see from being able to create views from the client?
1. I have written a transcoder that uses Jackson to serialize my objects. This works fine for gets and sets, but when I query a view I have to invoke Jackson myself on the each object in the results, I though if a transcoder was specified on the query method of a view then the objects could be converted for me, this would then be consistent with the get and sets.
2. I asked about creating views programmatically because CouchDB allowed this, because views are just ordinary key-value pairs in CouchDb. I have created my views using your Couchweb UI. But I want to be able to drop and create the database and then re-add all my views in one automated step. This is essential when doing automated testing. Since I did not spot any utilities to do this, I was looking at writing my own code to do so. I think this is a very common Use Case. How do I get the at the TestingClient class in src/test/java/net/spy/memcached/couch you suggest I look at ?
Let me get with Mike and look at the transcoder piece. That does make sense. Thanks for raising it.
On adding/removing views, at the moment, we don't plan on having API support in the client library for adding and removing views. I do think that's something we want to add at some point, but it is not in our short term plans. We're working more on the hard things, like pagination. I certainly understand that this needs to fit into your development lifecycle. Doing it right means taking the "dev_" views into consideration, and copying things from dev to production, etc.
You can probably build your own (it's really just an HTTP PUT || DELETE) quite easily, and I'd take Mike's pointer to the testing code as a sample. Of course, as an Open Source project, we'd love to see any contributions come back. It should be possible for this to be associated with a CouchbaseClient object, and thus leverage all of it's authentication and awareness of the HTTP interface to defining views.
You can find that here:
With regard to programmatic/dynamic views:
Short of such functionality, I've still got to believe people are somehow using couchBase, for example, behind a webpage that outputs tables based on user input. Think of...oh how about a page that gives server log stats based on the server, time of day, and log severity level. My question is, without building views dynamically, how would someone do this? Certainly I could grab all the rows and process searches on my own but wouldn't that kind of set aside the point of a highly optimized DBS?
So, two points: 1) this is the kind of thing where I think dynamic views would be highly desirable. 2) If that won't happen, any help appreciated about how people would handle this in real life today. I hope the answer isn't "pick a different DB." :) I feel like I'm missing something.
Yep, there's more to it.
Look at the definition of the view as being analogous to the definition of an index. Then look at walking through that view as something you can do with parameters that define what level of data to view, where to start, whether to go forwards or backwards, etc.
All of the client libraries give you access to running queries over views with those kinds of parameters. Check out the tutorial from your favorite sample over at couchbase.com/develop
Thanks! That helped a lot.
© 2013 COUCHBASE All rights reserved.