Deepak "The greatness of a nation can be judged by the way its animals are treated. Please stop cruelty to Animals, become a Vegan"
+91 73500 12833 deic...@gmail.com Facebook: https://www.facebook.com/deicool LinkedIn: www.linkedin.com/in/deicool "Plant a Tree, Go Green" Make In India : http://www.makeinindia.com/home On Thu, May 10, 2018 at 10:50 PM, Shawn Heisey <apa...@elyograg.org> wrote: > On 5/10/2018 10:58 AM, Deepak Goel wrote: > >> I wonder what does Solr stores in the document for fields which are not >> being used. And if the queries have a performance difference >> https://lucene.apache.org/solr/guide/6_6/defining-fields.html >> (A default value that will be added automatically to any document that >> does >> not have a value in this field when it is indexed. If this property is not >> specified, there is no default) >> > > If a field is missing from a document, the Lucene index doesn't contain > anything for that field. That is why there is no storage disadvantage to > having fields that are not being used. > > Lucene does not have the concept of a schema. That is part of Solr. Solr > uses the information in the schema to control its interaction with Lucene. > When there is a default value specified in the schema, the field is never > missing from the document. > > Sorry but I am unclear about - "What if there is no default value and the field does not contain anything"? What does Solr pass on to Lucene? Or is the field itself omitted from the document? What if I want to query for documents where the field is not used? Is that possible? Thanks, > Shawn > >