lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Reuschling <christian.reuschl...@gmail.com>
Subject Re: Numeric field min max values
Date Mon, 07 Nov 2011 19:16:56 GMT
hm - I recognized that when I iterate with TermEnum and decode the
value with prefixCodedToInt (..), I get correct values, but I also get
values that are not Field values of this field in the entire index.
E.g. I get in the number-encoded field with the timestams also a '0'
as term - but all documents have a correct timestamp.
I also recognized that Luke shows the same values, even in the case
the correct decoder is selected. Luke also gives the opportunity to
'browse term docs', and says that every document is a '0' - term
document.

Has anyone a idea?

best

Chris

2011/11/3 Christian Reuschling <christian.reuschling@gmail.com>:
> Thank you very much! This exactly solves my problem
>
>
> 2011/11/3 Ian Lea <ian.lea@gmail.com>:
>> I can't answer most of the questions, but oal.util.NumericUtils has
>> prefixCodedToInt (Long, etc) methods that will convert the encoded
>> value (what you are seeing, I presume) to int or long or whatever.
>> Maybe that will help.
>>
>>
>> --
>> Ian.
>>
>>
>> On Wed, Nov 2, 2011 at 7:19 PM, Christian Reuschling
>> <christian.reuschling@gmail.com> wrote:
>>> Hi,
>>>
>>> maybe it is an easy question - I searched over the lucene-user
>>> archive, but sadly didn't found an answer :(
>>>
>>> I currently change our field logic from string- to numeric fields.
>>> Until now, I managed to find the min-max values of a field by
>>> iterating over the field with a TermEnum
>>> (termEnum = reader.terms(new Term(strFieldName, ""));).
>>>
>>> Now, in the case of a numeric field, I get some strange field values
>>> as "$)A M`" - I guess this could be a low-precision token from the
>>> field trie?
>>>
>>> Is there a special way to iterate over numeric field values? Or is
>>> there a possibility to get the trie and ask him for the min-max
>>> values? Or another (util)-class?
>>>
>>> Thanks for all answers!
>>>
>>> Chris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>

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


Mime
View raw message