I am using a Posts and TaggedPosts column families like shown in this example
I would like to be able to find Posts Tagged with tags 'A', 'B' and 'C' (for the example)
the problem is i have to read entirely TaggedPosts with key A, and not just fetch first 10 results as it's shown in example, then intersect with all TaggedPosts with key B, to not miss one and so on
It's super inefficient, what would be your advise ion order to do this?
I was thinking to change TaggedPosts structure:
originally (rows keys: Tags name, and columns keys (Tags value or a timestamp or whatever), columns values: Post_id
and put Posts ids as Rows keys and
<br />
create colmun familty TaggedPosts with ... and column_metadata=[<br />
{column_name: tag1, ..., index_type: KEYS},<br />
{column_name: tag2, ..., index_type: KEYS},<br />
{column_name: tag3, ..., index_type: KEYS},<br />
and do:
<br />
get TaggedPosts where tag1=A and tag2=B and tag3=C;<br />
but not sure it would be much more effective, than intersecting/filtering client-side
There is also the possibility for multiTagged Posts to inserts Rows A, B, C, AB, AC, BC, ABC. The problem is 1) it increases exponentially with tags number, I would like to be able to have many tags 2) it becomes hard to dynamically remove/add a tag from a Post
