New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate optimize_bbox on geodistance queries #20032
Conversation
@clintongormley I updated the docs with deprecation in 2.2 since the |
@@ -48,6 +52,9 @@ | |||
|
|||
public static final String NAME = "geo_distance"; | |||
|
|||
public static final ParseField OPTIMIZE_BBOX_FIELD = new ParseField("optimize_bbox", "optimizeBbox"); | |||
protected static final DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(BaseGeoPointFieldMapper.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just do
public static final ParseField OPTIMIZE_BBOX_FIELD = new ParseField("optimize_bbox", "optimizeBbox").withAllDeprecated("no replacement: `optimize_bbox` became useless thanks to recent improvements")
and let ParseField emit deprecation warnings by itself. I don't think we need to only emit the deprecation warning for 2.2+ indices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ I had this before but was unsure if this approach would issue only a warning or fail the query (I see it uses deprecation logger). I'll revert to this and commit. Thx Adrien!
I left a minor comment about a potential simplification, but feel free to push as-is if you disagree. |
Add deprecation to the optimize_bbox parameter on geodistance queries. This is no longer needed since lucene geo distance queries already optimize by bounding box.
e61b2b8
to
fead1ee
Compare
closing as merged in: afb16b8 |
@nknize I think you should push this to master as well, otherwise the |
I'm wrapping it up now. |
Deprecates the optimize_bbox parameter on geodistance queries. This has no longer been needed since version 2.2 because lucene geo distance queries (postings and
LatLonPoint
) already optimize by bounding box.closes #20014