Skip to content

Conversation

@cbuescher
Copy link
Member

Splits parsing and Lucene query generation. Switches from storing lat/lon
separately to using GeoPoint instead.

Relates to #10217

@cbuescher
Copy link
Member Author

This PR continues #12283, so maybe @MaineC wants to take a look at it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the lat() and lon() methods? We don't want people setting lat but not lon so it don't makes sense (IMO) to allow them to be set separately

@cbuescher cbuescher force-pushed the feature/query-refactoring-geodistance branch 2 times, most recently from 32746b1 to 511ba0e Compare September 11, 2015 10:07
@cbuescher
Copy link
Member Author

@colings86 thanks for the comments, added small changes according to this and also minor changes to the GeoDistanceRange/PolygonQ.B. using new utility methods and writable GeoPoint from this PR. Glad if you want to take another look at that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should throw an IOException with a nice message if the read int is greater than values().length. See ShapeRelation for example of what I mean. We also need unit tests to make sure the ordinals don't change. See ShapeRelationTests for an example of that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, unit test already exists, I will combine the existing two classes in the following commit.

@colings86
Copy link
Contributor

@cbuescher Left some more comments but I think it's close

@cbuescher
Copy link
Member Author

@colings86 adressed your comments, other than the helper method in ESTestCase which I'd prefer to keep there I think I adressed your comments. Would also like for @MaineC to have a final look since this PR contains many of her own changes.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are currently trying to get rid of guava as a dependency - switch from using Preconditions to an explicit check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of this went away in the latest GeoBoundingBox PR - see e.g. there for replacement functionality: https://github.com/elastic/elasticsearch/pull/11969/files#diff-c34f179cb205333bd004736b1a8a71caR46

@MaineC
Copy link

MaineC commented Sep 11, 2015

Left a few comments. Thanks for adopting this PR.

@cbuescher
Copy link
Member Author

@MaineC addressed your comments, let me know if you think its okay now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can't be null anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will change.

@s1monw
Copy link
Contributor

s1monw commented Sep 15, 2015

left minor comments LGTM and doesn't need another review IMO

Splits parsing and Lucene query generation. Switches from storing lat/lon
separately to using GeoPoint instead.

Relates to elastic#10217
@cbuescher cbuescher force-pushed the feature/query-refactoring-geodistance branch from 128ce19 to 353fab9 Compare September 16, 2015 08:50
@cbuescher
Copy link
Member Author

Merged with feature branch with 8fb1aa9.

@cbuescher cbuescher closed this Sep 16, 2015
@cbuescher cbuescher deleted the feature/query-refactoring-geodistance branch March 11, 2016 11:50
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search/Search Search-related issues that do not fall into other categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants