Have an index,but query does not find anything


#1

create index ind_vocc_code on FilingTestDB(VOCCCODE) WHERE type =VOCC ;
select * from FilingTestDB where type=VOCC and VOCCCODE=SSLTK;

the bucket does has the document,but using n1ql i can not find the document,why?


#2

Please see the quotes below.

create index ind_vocc_code on FilingTestDB(VOCCCODE) WHERE type =“VOCC” ;

select * from FilingTestDB where type=“VOCC” and VOCCCODE=“SSLTK”;


#3

oh,thanks,i forgot the ",


#4

i find that if the bucket has an password i could not create the index,but i want to set a password to bucket,how to do?


#5

Hi,

The query engine supports password-protected buckets, but the cbq shell does not yet support it.

You can use one of the Couchbase SDKs to query your password-protected buckets, or you can use the N1QL REST API, using curl or your own script.