我使用的是instantsearch.js v4,我试图获得一个索引中配置的所有方面的列表。(在Algolia仪表盘中定义的)
有办法这么做吗?
我不是想让
- Color:
- green
- red
- ...但我想得到的是:
- Color
- Size
- (all the other facets)发布于 2021-12-06 15:23:42
您可以通过传递API (通配符)检索所有方面的列表和记录计数:
index.search('', {
facets: ['*']
});面和记录计数的列表将在facet_stats中。
博士:https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#retrieving-facets
https://stackoverflow.com/questions/70109521
复制相似问题