简体   繁体   中英

How to fetch all the facets from cloudsearch

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM