Couchbase 2.2.0 community edition views


#1

Hi,

I am using couchbase 2.2.0 community edition. Here is the problem description:

I have 4 design documents for views. In an order to have a working view, I need to publish the view every now and then. If I don’t publish it, any queries related to views will return null.

Any ideas or suggestions ?

Thanks

PP


#2

If you’re always using stale=ok in you view hits, the index might not be refreshed until you add enough mutations… 5000 is the default.
Either use stale=false or update-after.
Another interesting option is to change the value of updateMinChanges to 1.

http://docs.couchbase.com/admin/admin/Views/views-operation.html


#3

Thanks for suggestion;however didn’t work.

Here is the output …

Here is the changed query with stale set to false.

var AllSensors = GetView(“all_owners”, true)
.Stale(StaleMode.False)
.StartKey(new object { startKey})
.EndKey(new object { startKey});

After publishing view again … it works …


#4

What do you mean with “publishing now and then”? Does the design document automatically vanish? Or are you using it as a workaround to somehow re-index the documents that do not appear in the responses.


#5

Hi,

Design documents are there (when I look into the GUI of couchbase server). I must manually click publish on production views to make the server api query succeed. Each and every time I need to relaunch server(.NET) I need to do this.

Any ideas?

I have followed one suggestion of setting the stale=false;however it is no different/

PP


#6

There’s only “publish” button on the development views, so it seems your client is removing the production one forcing you to publish it again.
I’d check the client code to see what it’s doing…


#7

It looks like your server side views are not updating properly, for whatever reason. @pappu_pandit would it be possible for you to upgrade to 3.0.1 CE?


#8

Thanks for your reply.

Even though my problem is a deal breaker, I am bit concerned if upgrade will create more problems for me. I need to know if there is a way to replace revision without major issues.

I would seek your advice before trying out new revision.

Awaiting you reply.

PP


#9

@pappu_pandit well, the upgrade path should be quite smooth. What are you concerned about explicitly?


#10

Will my server application work if I replace couchbase 2.2 to 3.0 without any issue ?
I am using .net framework 1.3.3

-PP


#11

Normally they should be supported, but I’ll refer to @jmorris to confirm :smile:


#12

@pappu_pandit -

1.3.X should have no compatibility issues with Couchbase Server 3.0. However, I do suggest you upgrade to the latest 1.3.12 or better yet, 2.1.2.

-Jeff


#13

Thanks a lot for confirmation


#14

Hello Everyone,

Thanks for helping me out here with my view problem. I found the issue with my views. I was trying to recreate design document pragmatically by using actionfilter - something like this [CouchbaseDesignDoc(“doorevents”)]

This was causing production design documents to be initialized ie no views are present for production views.

I have removed the pragmatical creation of design document and everything seems okay.

_PP