Thanks a lot Simon,
For CB 3.0:
this seems to be working to the point of creating index with below query:
the above query seemed to worked fine with beer-sample bucket. further which it seems to fail to fetch json documents needed.
Queries I have tried so far:
cbq.exe> CREATE PRIMARY INDEX ON beer-sample
;
{
“requestID”: “4f3f95d7-49d1-40b1-afa1-208d4084d923”,
“signature”: null,
“results”: [
],
“status”: “success”,
“metrics”: {
“elapsedTime”: “8.3943208s”,
“executionTime”: “8.393321s”,
“resultCount”: 0,
“resultSize”: 0
}
}
cbq.exe> SELECT * FROM beer-sample WHERE country= “United States”;
{
“requestID”: “e2370227-5438-42af-9bc0-ac85009fdd81”,
“errors”: [
{
“code”: 5000,
“msg”: “syntax error”
}
],
“status”: “fatal”,
“metrics”: {
“elapsedTime”: “0”,
“executionTime”: “0”,
“resultCount”: 0,
“resultSize”: 0,
“errorCount”: 1
}
}
cbq.exe> SELECT * FROM default USE KEYS ‘21st_amendment_brewery_cafe’;
{
“requestID”: “b2107c2c-67c2-4d99-bc53-1476fa31b250”,
"signature": {
“": "”
},
“results”: [
],
“status”: “success”,
“metrics”: {
“elapsedTime”: “1.0551055s”,
“executionTime”: “1.0551055s”,
“resultCount”: 0,
“resultSize”: 0
}
}
cbq.exe> SELECT * FROM beer-sample USE KEYS '21st_amendment_brewery_cafe’;
{
“requestID”: “c9a9f69e-472e-46d5-86cb-71376cad7c91”,
“errors”: [
{
“code”: 5000,
“msg”: “syntax error”
}
],
“status”: “fatal”,
“metrics”: {
“elapsedTime”: “0”,
“executionTime”: “0”,
“resultCount”: 0,
“resultSize”: 0,
“errorCount”: 1
}
}
I would like to also mention that my Couchbase installation folder doesn’t have the cbq-engine or cbq executable file. may be i goofed up while installation, but am not able to find it in the bin folder or otherwise.
For CB 4.0:
I am facing connection issue as below:
C:\Program Files\Couchbase\Server\bin>cbq.exe -engine=http://localhost:8093/
Couchbase query shell connected to “http://localhost:8093/” . Type Ctrl-D to exit.
cbq.exe> SELECT * FROM beer-sample USE KEYS ‘21st_amendment_brewery_cafe’;
←[31m ERROR 5000 : Post “http://localhost:8093/query”: dial tcp 127.0.0.1:8093: ConnectEx tcp: No connection could be made because the target machine actively refused it. ←[0m
cbq.exe> CREATE PRIMARY INDEX ON beer-sample
;
←[31m ERROR 5000 : Post “http://localhost:8093/query”: dial tcp 127.0.0.1:8093: ConnectEx tcp: No connection could be made because the target machine actively refused it. ←[0m
So currently the queries are failing for some reason I am not able to resolve. If possible can you guide me further?