lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravikumar Govindarajan <ravikumar.govindara...@gmail.com>
Subject Actual min and max-value of NumericField during codec flush
Date Thu, 06 Feb 2014 10:16:35 GMT
I use a Codec to flush data. All methods delegate to actual Lucene42Codec,
except for intercepting one single-field. This field is indexed as an
IntField [Numeric-Trie...], with precisionStep=4.

The purpose of the Codec is as follows

1. Note the first BytesRef for this field
2. During finish() call [TermsConsumer.java], note the last BytesRef for
this field
3. Converts both the first/last BytesRef to respective integers
4. Store these 2 ints in segment-info diagnostics

The problem with this approach is that, first/last BytesRef is totally
different from the actual "int" values I try to index. I guess, this is
because Numeric-Trie explodes all the integers into it's own format of
BytesRefs. Hence my Codec stores the wrong values in segment-diagnostics

Is there a way I can record actual min/max int-values correctly in my codec
and still support NumericRange search?

--
Ravi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message