Feature request: reverse secondary indexing in memory


#1

For example data:

key               value
304332      {“name”: “Jack”, “os”: “iOS”, “appVersion”: “5.0.1”, “profile”:“a long …”}
304334       {“name”: “Tom”, “os”: “Android”, “appVersion”: “4.0.1”, “profile”:“a long profile…”}

And then i build secondary index to the attribute “appVersion”,
and i config a very big “Index RAM Quota” for Global Secondary Indexes and zero “Data RAM Quota”,
now i can search attribute “appVersion” to find the key, i think the operation is executed totally in memory.

Conversely, i want to search the key to find the value for the attribute “appVersion” without fetching the whole data from the disk(especially the data includes a very long attribute “profile”),
so i think i need a reverse secondary indexing that totally in memory,
and need new keyword in n1ql:

“CREATE REVERSE INDEX rev_idx_appver ON bucket1(appVersion) USING GSI”
“SELECT appVersion FROM INDEX rev_idx_appver where meta().id=304334”

or just use Redis-like protocol to fetch key-value from reverse index in memory.

If it can be realized, i can throw over Redis that was used to cache data from my couchbase.