I have a bucket with 4 fields
developer
date
action
items
and I created a covering index
Definition
CREATE INDEX covering_idx
ON barfyUsage
(developer
,date
,action
,items
)
as well as 4 secondary indexes on each field
maybe I am totally confused but do I need a primary index (I know bad) to be able to do a select without a where clause?
select date,action,developer,item from barfyUsage; or select * from barfyUsage work?
this is the error I am getting:
{
“errors”: [
{
“code”: 4000,
“msg”: “No index available on keyspace barfyUsage that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.”,
“query_from_user”: “explain select date,action,developer,item from barfyUsage;”
}
]
}
and here is the explain
{
“errors”: [
{
“code”: 4000,
“msg”: “No index available on keyspace barfyUsage that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.”,
“query_from_user”: “explain select date,action,developer,item from barfyUsage;”
}
]
}
I am still trying to learn couchbase indexes and could use a really good explanation of couchbase indexes if anyone knows of a good site …