-
Notifications
You must be signed in to change notification settings - Fork 17
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
design_search with start_key and end_key returns all documents, and does not honor the key range #62
Comments
thanks @tumulurig3 can you elaborate on what you mean by composite key? |
Meaning the key is made up of two different fields in the document. Some field called 'some_id' that is a document ID of some other document, and a timestamp field that is integer in seconds since epoch. Both are combined to be the key on the view. |
apologies, but i'm not familiar with composite/complex keys. any couchdb docs on that? |
Here is the cloudant screenshot with one of the documents as example. You see id, key and value columns. Value is the actual document. Key is a combination of 'building_id' and 'timestamp' fields. The id is the cloudant ID of the document that is indexed based on building_id/timestamp combination. Ignore my terminology about 'composite.' All I mean is that the index on this view is made up of two fields within the document. |
thanks for that. |
needed to add some additional possible values to pass to params
@ghost sorry for the very long delay. first, those parameters (startkey, endkey) need to be passed to either I needed to tweak the internals a bit, and now you can use however, i still haven't figured out how to make it work for composite keys, maybe you will have luck with that. |
Here is the version of sofa I am using:
Here is what I am trying, based on the view having a composite key on an ID value and a timestamp value:
Here is the result where the keys returned are completely out of range with the first key value having 17 unique values whereas I only specified exactly one, and the second value of the key being totally out of range where as I specified a range above:
Is there a different way to specify this correctly that I am missing? I also tried as follows with a vector instead of list and the output has no change:
When I inspect the documents returned, the key is correctly there as a 'list' with two items, the first being an id and the second being a timestamp:
The text was updated successfully, but these errors were encountered: