title: data modelling in cassandra to optimize search results
body: <p>I was just wondering if I could get some clue/pointers to our kind of simple data modelling problem.
  It would be great if somebody can help me in the right direction.</p>
  
  <p>So we have kind of a flat table ex. document
  which has all kinds of meta data attached to a document like 
  UUID documentId,
  String organizationId,
  Integer totalPageCount,
  String docType,
  String acountNumber,
  String branchNumber,
  Double amount,
   etc etc...</p>
  
  <p>which we are storing in cassandra  .
  UUID is the rowkey and we have certain secondary indexes like organization Id.</p>
  
  <p>This table is actaully suppose hold millions of records.
  Placing proper indices helps with a lot of queries but with the generic queries I am stuck.
  The problem is even with something like 100k records if I throw in a query like 
  select * from document where orgId='something' and amount > 5 and amount  &lt; 50 ...I am begining to see all Read time out problems.
  The query still works (although quite slow) if I limit the no of records to something lets say 2000.</p>
  
  <p>The above can be solved by probably placing certain parmas properly but there about dozens of those columns based on which we need to search.</p>
  
  <p>I am still trying to scale it horizontally so to place mutiple records in a single row.</p>
  
  <p>Hoping for a sense of direction.</p>