简体   繁体   English

如何从Amazon CloudSearch中的表字段获取不同的记录

[英]how to get distinct record from table field in Amazon CloudSearch

嗨,我是Amazon CloudSearch的新手。在mysql中,我们使用Distinct关键字获取唯一记录。如何在Amazon CloudSearch中使用此功能..请帮助我

Cloudsearch doesn't have the ability to do a "DISTINCT" query in the same way that a SQL database would, ie return the values of some specified fields with no duplicates. Cloudsearch无法以与SQL数据库相同的方式执行“ DISTINCT”查询,即返回某些指定字段的值且没有重复。

Cloudsearch always returns at least the IDs of all of the documents that match your search criteria. Cloudsearch始终至少返回与您的搜索条件匹配的所有文档的ID。

If you are looking for a specific document, and you have its document ID, you can retrieve it like: 如果要查找特定文档,并且具有其文档ID,则可以按以下方式检索它:

.../2011-02-01/search?bq=docid:'mydocid'

Otherwise, you'll need to have a field in the document that is unique, enforced by your application, that you can search by. 否则,您需要在文档中有一个由应用程序强制执行的唯一字段,您可以根据该字段进行搜索。

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

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