-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
fix(metadata): check if elasticsearch is set to false by user through ApiResource (#5115) #5177
fix(metadata): check if elasticsearch is set to false by user through ApiResource (#5115) #5177
Conversation
70acc9e
to
356362d
Compare
nice, you can even target the 3.0 branch as its a bug fix. side note: we're working on improvements for Elasticsearch on 3.1! |
Awesome! Would be epic to get this PR merged as it boosts performance instantly! |
Will do. |
@soyuka moved to 3.0 |
Add documentation to the elasticsearch property to reflect behavior added in api-platform/core#5177
thanks ! |
Epic guys, thanks for the flawless improvements and speed of merge! |
Add documentation to the elasticsearch property to reflect behavior added in api-platform/core#5177
If
elasticsearch
is set tofalse
by the user forcefully on theApiResource
attribute, then don't bother fetching the index anyway. This just causes needless slowdowns during container build.I would've liked to revert the logic, in other words, only do the
hasIndices
check ifelasticsearch: true
, but that would introduce a BC break, so after this change, projects using a mix of orm & elasticsearch entities can simply mark their orm entities withelasticsearch: false
and their elasticsearch entities withelasticsearch: true
, and the index discovery will only be done on those withelasticsearch: true
.Not a big deal if your application is small, but once you start getting into triple digits of entities, doing a request for every single entity causes major slowdowns when
APP_ENV
is not set toprod
(when the operations aren't cached).