nathanaschbacher / nodiak

Nodiak is a Node.js client for the Riak Distributed Database
MIT License
43 stars 16 forks source link

Add flag to Search and 2i's requests for whether or not to return results as RObjects. #13

Closed nathanaschbacher closed 12 years ago

nathanaschbacher commented 12 years ago

Currently the default behavior is to parse the search results and pull out the keys and then immediately go fetch those keys from Riak to generate a bunch of RObject instances.

This may not always be desirable behavior, so we should provide an option to the user to simply return the raw search results, so they can decide the appropriate next steps.

nathanaschbacher commented 12 years ago

I actually reversed this behavior for performance reasons. The default behavior will be to just send back the raw results, if the user wants them returned as pre-populated RObjects then they will need to pass in a true flag to the optional return_as_robjects parameter on either search method.