how i can get data from Cassandra using value
posts = {
'1': { //this post id
'user_id': '4',
'body': 'This is awesome!',
},
}
i cen get the post using post id can i get posts related to开发者_如何学Python certain user
i mean get post related to user_id=4 like an example (query using user_id attribute)
regrads
For that you will need to maintain your own (secondary) index. e.g
userIds = {
'4': { //this user id
'post_id': '1'
},
}
精彩评论