Couchbase Questions: N1QL

Have a Question? Get it answered by our community

neda.alipanah's picture
Asked 7 months 2 days ago
Latest activity 7 months 1 day ago

N1QL Access different indices of Array in JSON

I have a bucket of JSON documents. They are heterogenous documents with different items. Each document is an array with different objects. I need to select all objects of the array that satisfied certain criteria. I realize that you defined "OVER" keyword to iterate the collections. But I am not...

jonathonl's picture
Asked 7 months 6 days ago
Latest activity 7 months 1 day ago

Date Index

I know there are more date functions coming in DP3, but functions don't help as access points. Any thoughts on a specialized date index?

CREATE DATE INDEX date ON default(date)
...
jonathonl's picture
Asked 7 months 6 days ago
Latest activity 6 months 4 weeks ago

What About Grouping Indexes?

Just a though and maybe some other previewers can voice their opinions on this, but I was thinking that it might be good to allow multiple indexes to be grouped into the same design document for cluster performance considerations.

It could look something like:...

jonathonl's picture
Asked 7 months 2 weeks ago
Latest activity 7 months 2 weeks ago

IS NOT VALUED does not seem to work.

Maybe I am not understanding this correctly, but I expected IS NOT VALUED to be the same as (IS MISSING OR IS NULL). This does not seem to be the case.

SELECT * FROM gamesim-sample WHERE loggedIn IS
...
jonathonl's picture
Asked 7 months 2 weeks ago
Latest activity 7 months 2 weeks ago

Ranges not used on primary index for Meta().id

It would be highly beneficial if startKey and endKey ranges were used for document ids when a primary key exists. Currently the input ranges are null.

All of my documents follow an ID structure of {DocType}::{uuid} (e.g., User::3b49dd18-1d56-478e-8ab1-fb38e31ce7e2). So a common query...

jonathonl's picture
Asked 7 months 2 weeks ago
Latest activity 7 months 2 weeks ago

Engine crashes when prepending LIKE wildcard on index

I couldn't find a n1ql project at couchbase.com/issues, so I am posting this here.

Like expressions starting with a wildcard will crash cbq-engine when used on indexed field . My guess is that it's trying to use startKey and endKey on the view, which can only work if the wildcard is at...

jonathonl's picture
Asked 7 months 3 weeks ago
Latest activity 7 months 3 weeks ago

How does N1QL handle the stale parameter?

1. Does N1QL use "stale=ok" for queries that use created indexes?

2. Is there an issue with stale documents for buckets that have no indexes created on them? In other words, if a primary index is not created and "SELECT * FROM default" is called, is it possible for the result from the...

asdf9999's picture
Asked 7 months 3 weeks ago
Latest activity 7 months 3 weeks ago

N1QL and Java SDK

newbie question: is it possible to use Java SDK and N1QL ?

asdf9999's picture
Asked 7 months 3 weeks ago
Latest activity 7 months 3 weeks ago

n1ql query views

Hi,

I'm just getting started with Couchbase and I discovered N1QL which makes things easy ..

Is it possible to query "views" using N1QL ?

Thanks,

chewBM's picture
Asked 7 months 3 weeks ago
Latest activity 4 months 2 weeks ago

n1ql: How works?..is a total change in the "couchbase way"??

Hi, I'm curious about n1ql and how it fits inside couchbase, my first thought was it used views from behind and was only a sugar for the "tradicional couchbase way" but it's hasn't totally sense because how couchbase would know how many views must create?..for example

SELECT name FROM...

Pages