-
Notifications
You must be signed in to change notification settings - Fork 92
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
OP-288: ES refactor #245
OP-288: ES refactor #245
Conversation
BITBAG_ES_HOST=localhost | ||
BITBAG_ES_PORT=9200 | ||
###< sylius/elasticsearch-plugin ### | ||
ELASTICSEARCH_URL=http://localhost:9200/ |
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.
What with the BITBAG_ES_INDEX_PREFIX
? Will be without this an index collisions?
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.
This feature is not even documented, my code does not affect it.
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.
The BITBAG_ES_INDEX_PREFIX is an environment variable, which is added to index name to add support for multiple Sylius' installed in one server with this plugin installed.
$sort = $requestData[self::SORT_INDEX] ?? self::SORT_ASC_INDEX; | ||
|
||
$availableSorters = [$positionSortingProperty, $this->soldUnitsProperty, $this->createdAtProperty, $this->pricePropertyPrefix]; | ||
$availableSorters = [$this->soldUnitsProperty, $this->createdAtProperty, $this->pricePropertyPrefix]; |
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.
What if someone want to add custom sorter? Class decoration will be necessary to do this? What do you think about changing this prefixes to one symfony array parameter which can be easily override?
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.
Custom sort logic has to be implemented anyway. Not in scope of this task, but thanks for the idea. We can maybe schedule it for some other time.
Upgrade guide will be helpful. |
Right, done. |
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.
Two OS headers missing. The code looks great!
BITBAG_ES_HOST=localhost | ||
BITBAG_ES_PORT=9200 | ||
###< sylius/elasticsearch-plugin ### | ||
ELASTICSEARCH_URL=http://localhost:9200/ |
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.
The BITBAG_ES_INDEX_PREFIX is an environment variable, which is added to index name to add support for multiple Sylius' installed in one server with this plugin installed.
Changes in SyliusElasticsearchPlugin v4: