7

I tried understanding precisionStep at several places but cannot fully understand its concept. So, please explain what it is about, in very simple words.

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
  • @downvoter please be kind enough to state a reason. Is it a very stupid question, may be for experts but not for all :) – Rajat Gupta Oct 05 '13 at 15:10
  • Check "How it works" at [NumericRangeQuery Javadoc](http://lucene.apache.org/core/4_5_0/core/org/apache/lucene/search/NumericRangeQuery.html) – cheffe Jun 30 '14 at 08:36

1 Answers1

6

The precisionStep is a count, after how many bits of the indexed value a new term starts. The original value is always indexed in full precision. Precision step of 4 for a 32 bit value(integer) means terms with these bit counts: All 32, left 28, left 24, left 20, left 16, left 12, left 8, left 4 bits of the value (total 8 terms/value). A precision step of 26 would index 2 terms: all 32 bits and one single term with the remaining 6 bits from the left.

Mysterion
  • 9,050
  • 3
  • 30
  • 52