If you indexed with precStep=Integer.MAX_VALUE then your index should
only have the "shift 0" terms, I think.

Can you boil the exception case (values 1 to 2500) down to a small test case?

Mike McCandless

http://blog.mikemccandless.com


On Wed, Jul 30, 2014 at 2:21 AM, Olivier Binda <olivier.bi...@wanadoo.fr> wrote:
> Hello.
>
> How do you get the terms for a TermsEnum of an IntField coded with
> precisionStc = Integer.Max that you  get with
> MultiFields.getTerms(reader, intField).iterator(null) ?
>
> I had mitigated success trying to get the terms out of this iterator with
> NumericUtils.prefixCodedToInt
>
> I tried
>
> while (true) {
>                 BytesRef ref = termsEnum?.next()
>                 if (ref == null) break
>                 int value = NumericUtils.prefixCodedToInt(ref)
> }
>
> But it doesn't work (reliably) because of the trie structure I guess
>
> In an IntField with values 1,2,3,4,5 it worked
> But in an Int Field with all values from 1 to 2500, I got exceptions :
> lots of shifts aren't in the 0..31 range and it looks like there are
> "Blocks" with :
>
> first a term with shift 0 and value n
> followed by lots of terms with shift that aren't in 0..31 but who share the
> same prefix...
>
> Best regards,
> Olivier
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to