Have an index,but query does not find anything

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?

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”;

oh,thanks,i forgot the ",

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?

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.