-
-
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
Elasticsearch deprecation #5446
Comments
Don't use
You can even create your own ES resources and use them to avoid repetition:
|
I use that configuration for the ES ApiResource which works fine. I only configured |
We should fix this, you shouldn't need to disable elasticsearch on other api resources and this class shouldn't even been hit. |
Suggestion:
|
@soyuka Your suggested change works for all ApiResources. So non ES and ES resources are not checked with this change. Own resources:
Get is final, so cannot be used as extends. |
My bad you need to use the |
@soyuka Yes! |
API Platform version(s) affected: 3.1
Description
To avoid index calls to ES for doctrine entities on cache build you can define
elasticsearch: false
on your ApiResource which is documented in https://api-platform.com/docs/core/elasticsearch/#creating-models and added in #5177 but this triggers this deprecation https://github.com/api-platform/core/blob/main/src/Elasticsearch/Metadata/Resource/Factory/ElasticsearchProviderResourceMetadataCollectionFactory.php#L53Only on false a no index call is performed https://github.com/api-platform/core/blob/main/src/Elasticsearch/Metadata/Resource/Factory/ElasticsearchProviderResourceMetadataCollectionFactory.php#L101. So not sure how we can fix this deprecation?
Also the index name in hasIndices is now from the shortName, but should it not something like this?
How to reproduce
The text was updated successfully, but these errors were encountered: