Closed dtonys closed 11 years ago
So this comes up only when you attempt to use the $key special case index?
I haven't tested all cases, but queries on a 'category' field worked fine.
So yes, only this case as far as I know. Riak automatically indexes the key into the $key param when leveldb and 2i is enabled, so maybe the way this is done is different than user defined indexes.
Yeah it is... I know where the problem is.
https://github.com/nathanaschbacher/nodiak/blob/master/lib/bucket.js#L141
I'm deriving the index type "_int" or "_bin" for you as an abstraction based on what kind of data you send in as your query params.
You can get around this by using the lower level client backend adapter implementation for now, but I can probably fix this tonight without a problem:
https://github.com/nathanaschbacher/nodiak/blob/master/lib/backends/http.js#L234
Using the http API I can retrieve a list of keys from a bucket via 2i:
Using Nodiak, I get an empty list back when I try to query using the $key param
Querying a single value or range on $key both return an empty array as well.
Other 2i queries seem to work fine.