Select with Like Error


cbq-engine has stop with Like query after create index

create index name on sample(name)

select name from sample where like name like ‘%test%’



Can you restart cbq-engine and issue the following query:

select name from sample where name like ‘%test%’

You had 2 “likes” in your initial post.

If you still see a crash, please file a bug at


Is this a bug? I am also facing the same issue. I tried the following -

FROM beer-sample
WHERE name LIKE ‘21%’ // This works

FROM beer-sample
WHERE name LIKE ‘%21’ // Fails

This issue is seen only when I connect to a couch instance using the cbq-engine. When I use the tutorial data that came with the N1QL sample, it works all fine.


This is a bug which has been fixed in DP4. DP4 will be released next week.

Note: In DP4, you will need to escape `beer-sample` in back ticks, because of the hyphen.





I downloaded the DP4. I am able to run it.

D:\TFS\N1QL Engine\couchbase-query_dev_preview4>cbq-engine -datastore http://localhost:8091
_time=“2015-01-28T00:34:42-05:00” _level=“INFO” _msg=“New site created with url http://localhost:8091
_time=“2015-01-28T00:34:42-05:00” _level=“INFO” _msg=“cbq-engine started” datastore=“http://localhost:8091” version=“cbq-dp4”
_time=“2015-01-28T00:35:42-05:00” _level=“INFO” _msg=“Refreshing pool default”

After that when I issued the below N1Ql query,

SELECT name FROM beer-sample

I got the below exception

500: Internal Server Error

“requestID”: “3a33ab13-307b-4fef-8431-5873e31c5ed8”,
“errors”: [
“code”: 5000,
“msg”: “syntax error”
“status”: “fatal”,
“metrics”: {
“elapsedTime”: “0”,
“executionTime”: “0”,
“resultCount”: 0,
“resultSize”: 0,
“errorCount”: 1


Please use back ticks around `beer-sample`


It worked thanks!

One more quick question. I dont need the Default bucket. Is it fine to delete that? or it may cause some issue later on.



Just keep it :smile: