On Wed, 2010-04-28 at 16:57 +0200, Erick Erickson wrote: > And you can extend this ad nauseum. For instance, you could use 6 > fields, yy, mm, dd, HH, MM, SS and have a very small number of > unique values in each using really tiny amounts of memory to sort down > to the second in this case.
A reference to a String takes up 4 or 8 bytes, depending on JVM and setup. When doing String-based sorting in Lucene, there will be a reference for each document for each sort-field. With 18M documents, this will be at least 18M * 4 bytes * 6 = 432 MB. Plus the negligible amount of String objects. It is less than the previously estimated 1.2GB, but still worth noting. - Toke --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
