Add to EP mapping properties instead of overwriting them#3
Open
coenjacobs wants to merge 4 commits intoOpenWebconcept:masterfrom
Open
Add to EP mapping properties instead of overwriting them#3coenjacobs wants to merge 4 commits intoOpenWebconcept:masterfrom
coenjacobs wants to merge 4 commits intoOpenWebconcept:masterfrom
Conversation
The properties key of the mappings key in the mapping array already has values provided by the ElasticPress mapping. In the old situation, that entire key was overwritten, instead of adding the custom mappings to the properties.
Author
|
@mvdhoek1 @SimonvanWijhe This PR was left open on the previous home of the repository. I've ported it over and provided reference links to track back the conversation. Can this still be reviewed, please? |
mvdhoek1
approved these changes
Oct 27, 2022
Contributor
mvdhoek1
left a comment
There was a problem hiding this comment.
As far as I can tell this looks good. Simon is more familiar with ElasticSearch, he will be returning to work this Monday.
Contributor
|
When you're ready to merge don't forget the version bumps in src/OpenPub/Foundation/Plugin.php and openpub-base.php + changelog |
SimonvanWijhe
approved these changes
Oct 31, 2022
| ] | ||
| $mapping_version = $this->getElasticPressMappingVersion(); | ||
|
|
||
| if ($mapping_version == 5) { |
Contributor
There was a problem hiding this comment.
Een extra =
if ($mappingVersion === 5) {
Contributor
There was a problem hiding this comment.
Graag variabelen in camelCase voor consistentie met de rest van het project.
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.
The properties key of the mappings key in the mapping array already has values provided by the ElasticPress mapping. In the old situation, that entire key was overwritten, instead of adding the custom mappings to the properties.
Original PR from Bitbucket (for reference): https://bitbucket.org/openwebconcept/plugin-openpub-base/pull-requests/20
Fixes issue with custom mapping that has been reported before (for reference, link to original repository reported issue): https://bitbucket.org/openwebconcept/plugin-openpub-base/issues/4/elasticsearch-custom-mapping