-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with getAll #135
Comments
Support for a where condition in getAll hasn't been ported over to the 0.9 implementation. I have my doubts that it will, because it's bad practice to fetch and query objects like this. You should be using secondary indexes or Riak Search instead. If you have a more complex query, combine one of the two with MapReduce. |
That said, I'll look into updating the code to return meta objects too. |
that'll be great. As for the where condition, I'll adapt my code
|
also, you may wanna update the documentation to reflect what is currently possible with getAll and the where option. On Nov 27, 2012, at 1:39 PM, Mathias Meyer [email protected] wrote:
|
Yup, already removed the reference to where. |
Mathias, dbClient.mapreduce.add(fullBucketName).map((value) -> It simply returns an array of objects. From your book I understood that this was supposed to return a bucket and a key. Am I missing the point about the map reduce? On Nov 27, 2012, at 6:07 PM, Mathias Meyer [email protected] wrote:
|
@joques that query only extracts the value from the Riak object, hence the call to |
okay! what is then the proper method to extract both values and meta data during a map/reduce. I couldn't find it in the documentation On Dec 4, 2012, at 12:40 PM, Mathias Meyer [email protected] wrote:
|
please ignore my previous email. On Dec 4, 2012, at 12:40 PM, Mathias Meyer [email protected] wrote:
|
Could you please add some [rows: 20} or similar option to getAll, so that we could at query time set an upper limit on how much getAll returns? |
@ottok when it comes to just querying all data in a bucket, there is no way to do this in Riak. It will always have to fetch the entire data set. In general, using |
Exactly because getAll would most of the time return too many things, this kind of row limiter would be usefult. Another approach would be to run |
Adding a row limiter to the function itself would not cause Riak to automatically fetch a smaller set of data. It would still try to go ahead and fetch all data from the cluster. |
Hi all,
I seem to be experiencing this old trouble again with getAll. I made the following call
Obviously, I am expecting result to be an array, where each item is an object containing a meta and data entries for those objects that meet the conditions. However, it simply returns an array of objects. There are no meta data. Also, the condition is not tested against. Even unexpected objects are returned. Has the API changed? Am I making the wrong call or is it just a bug? If not what is now the right way to fetch all objects from a bucket that satisfy a condition and where the result contains both the data and the meta data?
Thanks in advance
José
PS: I am using coffeescript, but it shouldn't change anything
The text was updated successfully, but these errors were encountered: