N1QL Create index on

41 views
Skip to first unread message

Victor Fernandez

unread,
Aug 21, 2015, 1:58:50 PM8/21/15
to Couchbase
Hi, I have a Couchbase Server 3.0.1 with a N1QL DP4 process runing. I'm trying to create an index using this sentence:

CREATE INDEX iCashout ON 'shadow_casaargentina'(docType) WHERE docType='cashOut' USING GSI;

But I'm getting an error that only said "syntax error", does this version of couchbase server supports index? 

Thanks!

Cihan Biyikoglu

unread,
Aug 21, 2015, 3:31:31 PM8/21/15
to Couchbase
for some reason - I could not send this email directly from my inbox but wanted to be sure you saw this;

All looks correct but you need to be on the 4.0 beta build to use GSI;
http://www.couchbase.com/nosql-databases/downloads#PreRelease

Thanks
-cihan

Victor Fernandez

unread,
Aug 21, 2015, 5:40:27 PM8/21/15
to Couchbase
Hi Cihan, but even without GSI I got the same error. For example with this sentence:
CREATE INDEX iCashout ON 'shadow_casaargentina'(docType) WHERE docType='cashOut'

Cihan Biyikoglu

unread,
Aug 22, 2015, 3:06:08 PM8/22/15
to Couchbase
I don't have a 3.0 with N1QL DP4 handy. Any chance you could try this with Couchbase Server 4.0 beta?
I may be misreading this but if you are not using back ticks, pls make sure you have back ticks around `shadow_casaargentina` -

Victor Fernandez

unread,
Aug 24, 2015, 10:28:28 AM8/24/15
to Couchbase
Hi Cihan, thanks for your advice. In fact that was the problem, I was using simple quotes in the bucket name instead back ticks.
Reply all
Reply to author
Forward
0 new messages