-
Notifications
You must be signed in to change notification settings - Fork 11
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
MyModel.find_by_x(val).count seems to always return the global, unfiltered count #3
Comments
OK answered to my second question myself, by passing |
Yes.. unfortunately this is a couchbase level issue. Which I agree is really annoying. However I can't think of any way to get the count except by making the full request and counting the documents returned. Which is not something we want to do if the result size is huge (not efficient all) |
@avsej is there any way to obtain the count for a filtered query on a view? |
No, you get number of results in current response without actually parsing the |
@avsej yeah, I'm using the It makes sense that it doesn't return the total for the current filter as it would be difficult to compute cheaply. |
I got this right by using a dedicated map/reduce. I hesitate, should we add this as a default couchbase-orm behavior (with built in view and |
@slash4 that does sound like an interesting and useful option! I'd be interested to take a look |
Hi @stakach , I'm playing with this lib and everything works nicely except 2 strange things :
FFI::NullPointerError: invalid memory read at address=0x00000000000000 from /usr/local/bundle/gems/libcouchbase-0.1.0/lib/libcouchbase/query_view.rb:98:in
[]'`Any thoughts ?
The text was updated successfully, but these errors were encountered: