Creating types in a bucket

Hello everyone,

I am working on one bucket “default” and I’m holding all my table’s (table “forum”) data in it on documents. Every document holds one table element. Now I have to add 2 more tables, one is called “popularForums” and the other is “newestForums”. I need to add these tables’ data in my bucket too but I dont know how am I going to give those documents types like popular, newest etc. I know I shouldn’t create a new bucket everytime I add a new table so I want to add them all into “default” bucket. Can someone help? How can I add the type attribute? Thanks.


Document in bucket is JSON format, may be you can add a “type”:“popularForums” property to the document for popularForums table,and add “type”:“newestForums” property to the document for newestForums.
so you can identity the document by type.

1 Like

Hello @atom_yang
Yeah, I did it that way, and then queried by type. That worked.