node-ottoman icon indicating copy to clipboard operation
node-ottoman copied to clipboard

Failure to properly escape bucket names in index creation.

Open jmn8718 opened this issue 8 years ago • 6 comments

When i run ottoman.ensureIndices i get the following error

failed to created neccessary indices { Error: syntax error - at -
    at /home/motoko/workspace/heroku/couchbase-api/node_modules/couchbase/lib/bucket.js:668:15
  requestID: '5f8eeace-586c-4e4a-8e95-69e7fb1055d8',
  code: 3000,
  otherErrors: [] }

jmn8718 avatar Jan 15 '17 00:01 jmn8718

I'm have same problem

kivervinicius avatar Jan 19 '17 18:01 kivervinicius

I had a similar issue. I had named my bucket bucket-name with a hyphen. If you're creating n1ql indexes, n1ql is going to throw because the hyphen is a reserved character. I corrected this issue by renaming my bucket bucket_name.

enlore avatar Jan 23 '17 16:01 enlore

Changing the bucket name solved my problem

jmn8718 avatar Feb 11 '17 19:02 jmn8718

@brett19 Ottoman v2 will bubble up the error thrown by couchbase SDK 3. Is needed something else?

gsi-alejandro avatar Nov 19 '20 14:11 gsi-alejandro

@gsi-alejandro if use a bucket name with travel-sample inside ticks will that work ? something like 'travel-sample'

AV25242 avatar Nov 19 '20 16:11 AV25242

@AV25242 Ottoman v2 will work fine with travel-sample; bucket names with hyphen and indexes will be created successfully. I thought it's was supported by Server or SDK at some time in the past. Now is working ok, I run some test to ensure it.

gsi-alejandro avatar Nov 20 '20 13:11 gsi-alejandro