Hi Jaspreet,
Not sure whether this helps to answer your question as I didn't try to run
the code:
>From official guide:
> Within Lucene, each numeric value is indexed as a *trie* structure, where
> each term is logically assigned to larger and larger pre-defined brackets
> (which are simply lower-precision representations of the value). The step
> size between each successive bracket is called the precisionStep,
> measured in bits. Smaller precisionStep values result in larger number of
> brackets, which consumes more disk space in the index but may result in
> faster range search performance. The default value, 4, was selected for a
> reasonable tradeoff of disk space consumption versus performance
> If you only need to sort by numeric value, and never run range
> querying/filtering, you can index using a precisionStep of
> Integer.MAX_VALUE
> <http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE>.
> This will minimize disk space consumed.
|