-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 plugin: ability to get all Product assets #1054
Comments
+1 for that feature |
To solve this we would need to introduce some point which allows an async function so you can do a DB join for the data you need when indexing. I don't want to join all assets by default, as this would be an unnecessary penalty for those who do not need them. So the best solution is to make it so you can execute arbitrary code during the indexing process. One way would be to make the customMappings Another way might be to allow modification of the relations being selected here. This would keep the |
I can get this |
Hi! I have several ideas of implementing #1054:
First implementation is more generic, but we don't have list type in customMappings. I plan to use search method to generate feed for google merchant etc, so, for me, i'll need to create nine custom fields. Second implementation is less generic, but it can easily expose all assets like in product query |
Hi @Izayda |
Is your feature request related to a problem? Please describe.
It's quite common to have more than one asset in product listings (e.g. when your frontend needs switching between two images on hover). So in that case
featuredAsset
is not enough. When you store the assets in Product, you want to have access to it from ProductVariant.For now there is a problem using ElasticsearchPlugin to get
product.assets
as the array does't exist due to not being joined on fetch (see the example below).Example query for above scenario:
Describe the solution you'd like
Any ability to get Product assets without making indexing much slower.
Describe alternatives you've considered.
Actually the case when you use all assets in listings is very rare. Many people need just one more except the featured. So maybe the better way is to add secondary featured asset? But this is not a minimalist approach - basically one featured image is enough.
The text was updated successfully, but these errors were encountered: