Hi DuyHai, if there is 0 article, the row will obviously not exist I guess... (no article insertion will create the row) What is bugging you exactly ?
2015-01-22 20:33 GMT+01:00 DuyHai Doan <doanduy...@gmail.com>: > Hello Morgan > > The data model looks reasonable. Bucketing by day will help you to scale. > The only thing I can see is how to go back in time to fetch articles from > previous buckets (previous days). It is possible to have 0 article for a > country for a day ? > > > On Thu, Jan 22, 2015 at 8:23 PM, SEGALIS Morgan <msega...@gmail.com> > wrote: > >> Sorry, I copied/pasted the question from another platform where you don't >> generally say hello, >> >> So : Hello everyone, >> >> >> 2015-01-22 20:19 GMT+01:00 SEGALIS Morgan <msega...@gmail.com>: >> >>> I have a column family that store articles. I'll need to get those >>> articles from the most recent to the oldest, getting them from Country, and >>> of course the ability to limit the number of fetched articles. >>> >>> I though about another ColumnFamily "ArticlesByDateAndCountry" with >>> dynamic columns >>> >>> The Key would a mix from the 2 Char country Code (ISO 3166-1), and the >>> articles day's date so something like : US-20150118 or FR-20141230 -- >>> (XX-YYYYMMDD) >>> >>> In those Row, the column name would be the timeuuid of the article, and >>> the value is the article's ID. >>> >>> It would probably get a thousand of articles per day for each country. >>> >>> Let's say I want to show only 100 of the newer articles, I'll get the >>> today's articles, and if it does not fill the request (too few articles), >>> I'll check the day before that, etc... >>> >>> Is that the best practice, or does someone has a better idea for this >>> purpose ? >>> >> >> >> >> -- >> Morgan SEGALIS >> > > -- Morgan SEGALIS