lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7061) fix remaining api issues with XYZPoint classes
Date Thu, 03 Mar 2016 15:24:18 GMT


ASF subversion and git services commented on LUCENE-7061:

Commit dc35cea65673ca1c340770f3d0999f50834ddea5 in lucene-solr's branch refs/heads/branch_6_0
from [~rcmuir]
[;h=dc35cea ]

LUCENE-7061: fix remaining api issues with XYZPoint classes

Squashed commit of the following:

commit 0261e28dd29b1c2a1dcbd5e796966b2cdf2f4b82
Author: Robert Muir <>
Date:   Wed Mar 2 14:51:49 2016 -0500

    Add note about comparison order and test extreme values

commit e1f7bc244cd980e931d584c00ba73f8ac521c3fd
Author: Mike McCandless <>
Date:   Wed Mar 2 14:25:50 2016 -0500

    add explicit test to verify rect query is inclusive; make test fail fast by default

commit c9be9139ec2f9553ce05fb56b2667be77b8176b6
Author: Robert Muir <>
Date:   Wed Mar 2 14:03:47 2016 -0500


commit 351d0838bbc87dc7c6d83476bd9cb7ce6c38fc3c
Author: Robert Muir <>
Date:   Wed Mar 2 13:53:42 2016 -0500

    clean up pointrangequery: remove nulls and inclusives

commit 0796057a8041ddf43341611b477502fa2307f0b1
Merge: 742ee02 e3198ca
Author: Robert Muir <>
Date:   Wed Mar 2 13:26:48 2016 -0500

    Merge branch 'master' into unfuck_points

commit 742ee02aaf55439463daddbd3ea16c5e8df31f01
Author: Robert Muir <>
Date:   Wed Mar 2 13:16:08 2016 -0500

    Remove nulls and inclusives from points apis
(cherry picked from commit 8eada27)

> fix remaining api issues with XYZPoint classes
> ----------------------------------------------
>                 Key: LUCENE-7061
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>             Fix For: master, 6.0
>         Attachments: LUCENE-7061.patch
> There are still some major problems today:
> XYZPoint.newRangeQuery has "brain damage" from variable length terms. nulls for open
ranges make no sense: these are fixed-width types and instead you can use things like Integer.maxValue.
Removing the nulls is safe, as we can just switch to primitive types instead of boxed types.
> XYZPoint.newRangeQuery requires boolean arrays for inclusive/exclusive, but thats just
more brain damage. If you want to exclude an integer, you just subtract 1 from it and other
simple stuff.
> For the apis, this means Instead of:
> {code}
> public static Query newRangeQuery(String field, Long lowerValue, boolean lowerInclusive,
Long upperValue, boolean upperInclusive);
> public static Query newMultiRangeQuery(String field, Long[] lowerValue, boolean lowerInclusive[],
Long[] upperValue, boolean upperInclusive[]);
> {code}
> we have:
> {code}
> public static Query newRangeQuery(String field, long lowerValue, long upperValue);
> public static Query newRangeQuery(String field, long[] lowerValue, long[] upperValue);
> {code}
> PointRangeQuery is horribly complex due to these nulls and boolean arrays, and need not
be. Now it only works "inclusive" and is much simpler.
> XYZPoint.newSetQuery throws IOException, just creating the query. This is very confusing
and unnecessary (no i/o happens).
> LatLonPoint's bounding box query is not inclusive like the other geo. And the test does
not fail!
> I also found a few missing checks here and there while cleaning up.

This message was sent by Atlassian JIRA

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

View raw message