Open dkarlovi opened 4 years ago
Followup here: we need about 450 filters added, this is currently too much because the URL generated toward VSF API is too large (getting HTTP error 414).
We've worked around that by adding the filters in server-side, just before building the query. It means the filters don't always need to travel from the client to the server (being static, configured in the config file). The issue we're still getting all the aggregations back, even the empty ones, that one can be patched out.
What would really help is:
This would fix all the issues:
Any update on this? @gibkigonzo
Current behavior
You need to define all your attributes in the root of your Elasticsearch document, like so
In the case you're using ES < 7 (one index for everything) or if you have a lot of attributes (in our case - 903, not all attributes for all products of course), you'll run into the issue of Elasticsearch disallowing more than 1000 fields per index by default, changing that limit can lead to performance and memory usage problems.
Expected behavior
Allow storing arbitrary number of attributes, for example using an array instead:
Additional benefit of this approach is: it doesn't clutter the mapping, but also makes mapping attributes possible with libs like ONGR Elasticsearch (used in Coreshop bridge), which maps only explicitly annotated properties by default, you cannot add them on the fly.
Steps to reproduce the issue
Not sure how I'd do that, just create a 100 products, each with 10 different attributes attached,
Version of Vue Storefront
Can you handle fixing this bug by yourself?
Which Release Cycle state this refers to? Info for developer. (doesn't apply to Next)
Pick one option.
develop
branch and create Pull Request2. Feature / Improvement
back todevelop
.release
branch and create Pull Request3. Stabilisation fix
back torelease
.hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.Additional information
Somewhat related to vuestorefront/vue-storefront-1#254, doing this would require changing the aggregations, so it's a good direction to not require naming the filters at all, since you can construct filters from what the search matched (and enrich it with attribute metadata, which is done already).