lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Bertin <l.ber...@lombardodier.com>
Subject RE: Migration from lucene 4.7 to lucene 6.2.1 (4->5 and 5->6 iteratively) => numerics fields are not indexed anymore
Date Mon, 26 Sep 2016 05:22:09 GMT
Copy that :)
Thanks for the confirmation.

Ludovic

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: vendredi, 23. septembre 2016 20:51
To: Ludovic Bertin
Cc: Lucene Users
Subject: Re: Migration from lucene 4.7 to lucene 6.2.1 (4->5 and 5->6 iteratively) =>
numerics fields are not indexed anymore

Sorry, the upgrade tool does not convert your previous (postings
based) numerics to points; you need to reindex to achieve that.

Mike McCandless

http://blog.mikemccandless.com


On Fri, Sep 23, 2016 at 1:01 AM, Ludovic Bertin
<l.bertin@lombardodier.com> wrote:
> Thanks Mike for your answer.
> I do have change the way to index numeric fields :
>
> doc.add(new DoublePoint(name, (Double) value));
> doc.add(new StoredField(name, (Double) value));
>
> But it's about old values in my indexes. I was supposing the migration tool would do
the same to preserve the indexation of numeric values, but after migration there's no point
values excepts the new docs created after migration.
> So I've done a script to read migrated index and write a new one by adding a PointValue
for each numeric value.
>
> Ludovic
>
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: jeudi, 22. septembre 2016 22:35
> To: Lucene Users; Ludovic Bertin
> Subject: Re: Migration from lucene 4.7 to lucene 6.2.1 (4->5 and 5->6 iteratively)
=> numerics fields are not indexed anymore
>
> You need to change how you index the documents to add e.g. IntPoint,
> so that points are actually indexed.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Thu, Sep 22, 2016 at 11:01 AM, Ludovic Bertin
> <l.bertin@lombardodier.com> wrote:
>> Hi,
>>
>> I have an index with some stored and indexed numeric fields.
>> After the migration, I can still see the numeric fields stored into my documents,
>> But I was expecting to have those fields indexed as point values (see https://lucene.apache.org/core/6_2_1/core/org/apache/lucene/index/PointValues.html
)
>>
>> When I'm doing that search :
>> Query query = LongPoint.newRangeQuery("LOCAL_TIME", Long.MIN_VALUE, Long.MAX_VALUE);
>>
>> TopDocs topDocs = searcher.search(query, 20);
>>
>> I find zero documents.
>>
>> If I'm doing this :
>>
>> int nbDocsWithLocalTime = PointValues.getDocCount(reader, "LOCAL_TIME");
>>
>> I'm getting zero.
>>
>> Did I miss something ?
>> Thanks in advance for any help.
>>
>> Ludovic BERTIN
>>
>>
>> [[ rethink everything. ]]<http://www.lombardodier.com>
>>
>> DISCLAIMER **********************************************
>> This message is intended only for use by the person to
>> whom it is addressed. It may contain information that is
>> privileged and confidential. Its content does not constitute
>> a formal commitment by Bank Lombard Odier & Co Ltd
>> or any of its branches or affiliates. If you are not the
>> intended recipient of this message, kindly notify the sender
>> immediately and destroy this message. Thank You.
>> ***************************************************************
>>
> [[ rethink everything. ]]<http://www.lombardodier.com>
>
> DISCLAIMER **********************************************
> This message is intended only for use by the person to
> whom it is addressed. It may contain information that is
> privileged and confidential. Its content does not constitute
> a formal commitment by Bank Lombard Odier & Co Ltd
> or any of its branches or affiliates. If you are not the
> intended recipient of this message, kindly notify the sender
> immediately and destroy this message. Thank You.
> ***************************************************************
>
[[ rethink everything. ]]<http://www.lombardodier.com>

DISCLAIMER **********************************************
This message is intended only for use by the person to
whom it is addressed. It may contain information that is
privileged and confidential. Its content does not constitute
a formal commitment by Bank Lombard Odier & Co Ltd
or any of its branches or affiliates. If you are not the
intended recipient of this message, kindly notify the sender
immediately and destroy this message. Thank You.
***************************************************************

Mime
View raw message