With couchbase views, you can emit a null key to the view so that you can optimally build a view of all the documents that meet a given criteria (not taking up memory to store the keys). Then you can easily retrieve all the documents that meet that criteria by querying the view for everything.
I would like to do the same with with GSI, but it seems that you cannot create a secondary index without giving it some kind of key. In my case, any key I give it would just be useless and a waste of memory.
Is there any way that I can create a secondary index without a key?
e.g. CREATE INDEX users ON bucket WHERE type="user" USING GSI
or CREATE INDEX users ON bucket() WHERE type="user" USING GSI
or CREATE INDEX users ON bucket(NULL) WHERE type="user" USING GSI