Fix split package org.apache.lucene.document#78186
Merged
ChrisHegarty merged 4 commits intoelastic:masterfrom Sep 23, 2021
Merged
Fix split package org.apache.lucene.document#78186ChrisHegarty merged 4 commits intoelastic:masterfrom
ChrisHegarty merged 4 commits intoelastic:masterfrom
Conversation
58 tasks
Member
|
I think moving it to percolator would be good, the less stuff in server the better, but I would like @martijnvg to comment on whether there is another reason BinaryRange should be in server. |
Member
|
I'm +1 to moving |
Contributor
Author
|
Thanks for the comments - moved to percolator. |
Contributor
Author
|
@elasticmachine test this please |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To allow for the future modularization of Elasticsearch with Java Modules, there are a number preparatory tasks that need be completed. This is one part of one such task: eliminate split packages.
The ES class
BinaryRangeis located in theorg.apache.lucene.documentpackage, which is shared (thus split at runtime) with Lucene-core. A split package, in this case between Elasticsearch-core and Lucene-core, will result in a configuration error at runtime when Elasticsearch-core is deployed as a module.The
BinaryRangeclass accesses the previously package-private RangeFieldQuery class, thus requiring it to be in the same runtime package. In a recent Lucene 9.0 change,RangeFieldQueryhas been made public, thereforeBinaryRangeno longer requires to be in the same runtime package asRangeFieldQuery. MovingBinaryRangeto a non-lucene package will eliminate the split package issue mentioned above.This PR proposes to keep
BinaryRangein sever, but moved it toorg.elasticsearch.lucene.document. Alternatively, since it appears thatBinaryRangeis used exclusively by code inorg.elasticsearch.percolator, moving it to the percolator module could be reasonable.relates #78166