How to fetch all the facets from cloudsearch

旧城冷巷雨未停 提交于 2019-12-24 14:40:21

问题


On cloudsearch we can fetch facet information by passing facets.FIELD parameter in query, but I want cloudsearch to return all the available (returnable) facets. Is there a way we can do it? I have many facets which have return enabled.


回答1:


There is no way to retrieve facet information for all facets -- you must explicitly specify each facet you're interested in, eg to get the values for facets FOO and BAR, your query would specify:

facet.FOO={}&facet.BAR={}

Here are the faceting docs if you haven't seen them: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html

I also want to make sure you're not confused about what 'return enabled' means. That means a field can be included in search results and it is unrelated to facets. I'm guessing you meant that the fields are FacetEnabled. You can read more about that at: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html



来源:https://stackoverflow.com/questions/28856521/how-to-fetch-all-the-facets-from-cloudsearch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!