On 1/30/2013 6:04 PM, Petersen, Robert wrote:
Hi
Just a quick question: for a single valued int field in solr 3.6.1 how much
more space is used if the field is stored vs indexed and not stored?
Here is the index file format reference for the two files that make up
stored fields in the 3.6 index format:
http://lucene.apache.org/core/3_6_2/fileformats.html#field_index
If I read that right, the fdx file has a fixed size of 8 bytes times the
number of documents in the segment. The size should only depend on the
number of documents, not the number of stored fields or their contents.
The fdt file contains the actual stored data and will vary according to
the actual stored data. Smaller fields take up less space than large
fields. If a stored field is missing from a document, it probably
doesn't take up any space. There is some overhead - exactly how much
overhead is hard for me to calculate, especially since I don't know how
much space a VInt takes up, which may in fact be variable.
If I had to guess about the extra space required for storing an int
field, I would say it's in the neighborhood of 20 bytes per document,
perhaps less. I am also interested in a definitive answer.
Thanks,
Shawn