There might not be a built-in way to do this, but if you make two rows for
each author, eg:

nabokov_fulltext [ 'lolita' : 'Lolita, light of my life ...' , ...]
nabokov_bookindex [ 'lolita' : None , ... ]

you could query the bookindex for each author without cassandra having to
load the full texts.  This would make your cassandra row cache much more
effective for this type of query as well, and you might even consider
putting it in a separate CF.

I'd also recommend compressing the data for the full text column values.
 You can't query very well against them anyway, and it will make everything
(inserts, reads, compaction) so much better.

dan

On Tue, Jun 7, 2011 at 6:30 PM, Patrick de Torcy <pdeto...@gmail.com> wrote:

> But I want values in my columns... Imagine a cf with authors as keys. Each
> author has written several books. So each row has columns with the title as
> column names and the text of the book as value (ie a lot of data). If a user
> wants to know the different books for an author, I'd like to be able to have
> the column names without the values, then a user can pick a book name. In
> this case I can retrieve the value from this column (and only for this one).
> Of course, I could have an additionnal column which will manage the column
> names (=titles), but it's not very efficient and could be source of
> errors...
> If you have a method to retrieve the number of columns of a row (without
> their values),  I can't see why you couldn't retrieve the column names
> (without their values). It's perharps harder than I think... But it would be
> rather useful !
>
> Thanks !
>
> On Mon, Jun 6, 2011 at 2:08 AM, aaron morton <aa...@thelastpickle.com>wrote:
>
>> You can create columns without values.
>>
>> Are you talking about reading them back through the API ?
>>
>> I would suggest looking at your data model to see if there is a better way
>> to support your read patterns.
>>
>> Cheers
>>
>>  -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 6 Jun 2011, at 10:18, Patrick de Torcy wrote:
>>
>> It would be definetely useful to be able to have columns (or super
>> columns) names WITHOUT their values. If these ones are pretty big or if
>> there are a lot of columns, that would generate traffic not necessarily
>> needed (if in the end you are just interrested by some column).
>> Moreover it doesn't seem to be a feature too difficult to implement (well,
>> I think...)
>>
>> Patrick
>>
>>
>>
>

Reply via email to