lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nuno Oliveira <>
Subject Re: LongPoint.newRangeQuery results differ from LegacyNumericRangeQuery.newLongRange
Date Tue, 25 Jul 2017 14:33:55 GMT
Thank you for your answer Chris.

What I did was to get all the Documents from the old indexes, and loop
the existingDocuments, then I replaced the "date" field by the same
values but created with LongPoints.
Something like this:
for (Document existingDocument : existingDocuments) {
Document doc = createDocument();

doc.add(createStringField("recordId", existingDocument.get("recordId"),

//Here I create a new LongPoint based on the "date" of the 
//old documents represented by LongField 

Term("recordId",existingDocument.get("recordId")), doc);

This way my queries are returning the number of hits I expected.
Do you think this is wrong in any way? I don't know if this can be
considered reindex, since I'm not using the original documents to index
but old indexes and if it can cause any problems.

Nuno Oliveira 

On Seg, 2017-07-24 at 13:48 -0700, Chris Hostetter wrote:
> The Points data structures are completley different and distinct 
> from the Term Index structures used by LegacyNumeric fields -- just having 
> hte backwards codex (or using merges to convert indexes to the new index 
> format) isn't enough -- you have to reindex.
> -Hoss
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message