title: Read collection with documents of varying schema from mongo using spark
body: <p>I am trying to read a collection with documents of varying schema from mongo using spark-mongo connector to get a dataframe. What is see is that spark is inferring the schema for the dataframe from the first record and if i query the dataframe for any other field , i am getting an excpetion. Is there any way to resolve this issue?</p>