I created one bucket and set it’s type to “Ephemeral” and I tired following query
select * from temp limit 1;
but it show following error
[
{
“code”: 4000,
“msg”: “No index available on keyspace temp 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”: “select * from temp limit 1;”
}
]
Then I tried to create index on that bucket like this
create primary index on temp;
but it show following error
[
{
“code”: 5000,
“msg”: “GSI CreatePrimaryIndex() - cause: Encounter errors during create index. Error=Ephemeral Buckets Must Use MOI Storage\n.”,
“query_from_user”: “create primary index on temp;”
}
]
Ok got your point but one more thing , is there any way to query on all keys like this
select * from temp use keys [*];
basically I want to query on all those documents because when I tried this query
select meta().id from temp;
it show following error
[
{
“code”: 4000,
“msg”: “No index available on keyspace temp 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”: “select meta().id from temp;”
}
]
sorry, but I did not understand this can you explain more because I tried this
select * from temp use keys;
but it show this error
[
{
“code”: 3000,
“msg”: “syntax error - at ;”,
“query_from_user”: “select * from temp use keys;”
}
]
my requirement is how I should query on “Ephemeral” bucket all data ?
Thanks now my all doubts clear, but when I create bucket there no option to index storage mode MOI. is MOI index should create manually or when we create bucket “Ephemeral” then it auto MOI index?
Index Storage Mode option is at cluster level not bucket level. When Index Service added first time in cluster it gives the option for Enterprise edition (may be Community edition MOI is not available so it might not have given that option). You should see in Settings.
Memory Optimized Indexes(MOI) are available in Enterprise Edition Only. If you want to index on Ephemeral bucket, that’s the only supported storage type.