Couchbase Questions: Couchbase views

Have a Question? Get it answered by our community

vakoroteev's picture
Asked 4 months 1 week ago

Strange behavior with paginated query.

I get a strange behavior with paginated query. While I paginate on the result set, I get duplicates of some documents. I'm doing the following in my code:

adiefatlady's picture
Asked 4 months 1 week ago

Howto create an index for date range

I would need to be able to get documents based on them being "active". A document is active if its online and "now" is between the start and stop date.


bibhas's picture
Asked 6 months 2 weeks ago
Latest activity 3 months 4 weeks ago

How does stale query work?


Sorry, I know the documentation is very clear about how stale=ok should work. But, I am not seeing the right behavior.

I am running a _count reduce query with stale set to OK.

vantage's picture
Asked 6 months 3 weeks ago

Bucket views won't refresh with just 186 records

I'm working on a project with a Couchbase store, and earlier it was working fine but when I added a bunch of items to the project's main Couchbase bucket I ran into problems. The items in the bucket only number 186, but the views associated with this bucket are refusing to refresh.

If I...

socmag's picture
Asked 8 months 1 week ago

ISO 8601 Date in Map function


I'm evaluating Couchbase for a job, and experimenting with some things...

I'm trying to write a map/reduce that counts posts by day.

In the document, the created_date is specified in the ISO 8601 format.
(I'm assuming the libv8 that you are using has the ISO 8601...

bibhas's picture
Asked 8 months 3 weeks ago
Latest activity 8 months 3 weeks ago

How to prevent same key and document ID appear multiple times in index?

My document is like this:

    id: 'ABC123',
    background: 'red',
    foreground: 'black',
    border: 'black'

I need to be able to find documents by color. So, I create this view...

sruthi's picture
Asked 9 months 5 days ago
Latest activity 9 months 5 days ago

how to query mulitiple composite key?

question is whether we can give many composite keys in startkey and end key

example my data in bucket:

sruthi's picture
Asked 9 months 1 week ago
Latest activity 9 months 1 week ago

how to give muliple composite keys in startkey and endkey to search in views

Hi, i create a view which emit composite keys

function (doc, meta) {
emit([,,doc.age], doc);

i want to get results for multiple composite keys. like [['name1','male','99],['name2','female','99']]

i have group of names along with sex but i...'s picture
Asked 9 months 2 weeks ago
Latest activity 9 months 2 weeks ago

[Views] startkey_docid doesn't work except for _all_docs


The startkey_docid view parameter doesn't seam to have any effect on views.
It only works with the "undocumented/unsupported" _all_docs view each time we test it

Example :

- Create the default bucket on a fresh couchbase cluster/server
- Insert 3 keys...

Sandeep's picture
Asked 12 months 3 days ago
Latest activity 1 month 1 day ago

Filtering data based on datetime

Is there an option of filtering data using views based on current datetime
For ex. I've many JSON Document each of these document contains a key:value as

I would like to filter those documents whose Starttime is less than...