Re: Best practice to setup schemas for documents having different structures

2014-11-06 Thread Vishal Sharma
Thanks for the response guys! Appreciate it. *Vishal Sharma** Team Lead, Grazitti Interactive*T: +1 650­ 641 1754 E: vish...@grazitti.com www.grazitti.com [image: Description: LinkedIn] [image: Description: Twitter]

Re: Best practice to setup schemas for documents having different structures

2014-11-05 Thread Ryan Cooke
We define all fields as wildcard fields with a suffix indicating field type. Then we can use something like Java annotations to map pojo variables to field types to append the correct suffix. This allows us to use one very generic schema among all of our collections and we rarely need to update it.

Re: Best practice to setup schemas for documents having different structures

2014-11-05 Thread Erick Erickson
It Depends (tm). You have a lot of options, and it all depends on your data and use-case. In general, there is very little cost involved when a doc does _not_ use a field you've defined in a schema. That is, if you have 100's of fields defined and only use 10, the other 90 don't take up space in e

Best practice to setup schemas for documents having different structures

2014-11-04 Thread Vishal Sharma
This is something I have been thinking for a long time now. What is the best practice for setting up the Schemas for documents having different fields? Should we just create one schema with lot of fields or multiple schemas for different data structures? Here is an example: I have two objects st