简体   繁体   English

如何构建查询表单以请求AWS CloudSearch?

[英]How to build query form to request AWS CloudSearch?

I have a SearchDomain on AWS CloudSearch. 我在AWS CloudSearch上有一个SearchDomain。 I know all the defined facets names. 我知道所有定义的构面名称。

I would like to build a web query form to use it, but I want to add my categories values (facets) on the side, like it is done on Amazon webstore 我想构建一个使用它的Web查询表单,但是我想在侧面添加我的类别值(构面),就像在Amazon网站上完成的一样

The only way I have to get facets values is to make a query (params query) and in the answer will contain facets linked to my query results. 我必须获取构面值的唯一方法是进行查询(参数查询),并且答案中将包含链接到查询结果的构面。

Is there a way to fetch all the facet.FIELD possible values to build the query form ? 有没有办法获取所有facet.FIELD可能的值来构建查询表单?

If not (as read here ), how to design a form using facets ? 如果没有(为已读这里 ),如何设计使用面形式?

You could also use the matchall keyword in a structured query. 您也可以在结构化查询中使用matchall关键字。 Also, since you don't need the results you can pass size=0 so you only get the facets which will reduce latency. 另外,由于不需要结果,因此可以传递size = 0,因此仅获得可减少延迟的构面。

/2013-01-01/search?q=matchall&q.parser=structured&size=0&facet.field={sort:'count',size:100}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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