[Platform.sh] Only enable Solr if parameter 'search_engine' is 'solr'#540
Open
ChrisMoutsos wants to merge 2 commits intoezsystems:masterfrom
Open
[Platform.sh] Only enable Solr if parameter 'search_engine' is 'solr'#540ChrisMoutsos wants to merge 2 commits intoezsystems:masterfrom
ChrisMoutsos wants to merge 2 commits intoezsystems:masterfrom
Conversation
alongosz
requested changes
May 7, 2020
Member
alongosz
left a comment
There was a problem hiding this comment.
Thanks for the contribution. Makes sense in general.
However please create a JIRA ticket and prefix the PR title with it, followed by a comma (:) and a short description of the change (ideally in past simple as it's gonna become history after merge).
If this causes some sort of a visible bug and is reproducible on a clean installation, then some steps to reproduce should be added. I'm assuming that it happens when you configure P.sh to use Solr, but set legacy, right? Does it make the system crash or just index data incorrectly?
As for the change itself:
| } | ||
|
|
||
| if (isset($relationships['solr'])) { | ||
| if (isset($relationships['solr']) && ($_SERVER['SEARCH_ENGINE'] ?? false) === 'solr') { |
Member
There was a problem hiding this comment.
if a defined parameter is a string, then setting bool as a fallback doesn't make any sense, even if it works
Suggested change
| if (isset($relationships['solr']) && ($_SERVER['SEARCH_ENGINE'] ?? false) === 'solr') { | |
| if (isset($relationships['solr']) && ($_SERVER['SEARCH_ENGINE'] ?? '') === 'solr') { |
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.
If there is a Platform.sh Solr relationship, but the project config is not set to use the "solr" search engine (i.e. it's set to "legacy", or not set at all), then the Solr params shouldn't be set here.