[英]How to upload data to Cloudsearch programmatically .Net
I am attempting to use Cloudsearch in lieu of SQL-based full-text indexing. 我正在尝试使用Cloudsearch代替基于SQL的全文索引。 However, I have had little luck thus far.
但是,到目前为止,我运气不好。 Their API documentation is just horrendous, with almost no examples and no mention of using the SDK to do it.
他们的API文档简直太恐怖了,几乎没有示例,也没有提及使用SDK来实现。 All they provide are some shoddy command line scripts.
他们提供的只是一些伪劣的命令行脚本。
My use-case is that I am decompiling an ALD file and need to store the resulting text data up there. 我的用例是我正在反编译ALD文件,并且需要将生成的文本数据存储在那里。 The only listed methods involve using the command line or the web console, which won't do, seeing as I have tens of thousands of documents to manage.
列出的唯一方法涉及使用命令行或Web控制台,但不会,因为我要管理成千上万的文档。 Surely there is a way I can pass it an index and some text data via the C# SDK.
当然,有一种方法可以通过C#SDK将其传递给索引和一些文本数据。
You are right, there is not much sample code and I am not a C# programmer so I won't really try to code it but in an effort to get you in the right direction it seems you just need to instantiate an UploadDocumentsRequest
object, populate the Documents
property then pass it to AmazonCloudSearchDomainClient.UploadDocuments
. 没错,示例代码并不多,我也不是C#程序员,所以我不会真正尝试编写代码,但是为了使您朝正确的方向迈进,似乎只需要实例化一个
UploadDocumentsRequest
对象,然后填充然后将Documents
属性传递给AmazonCloudSearchDomainClient.UploadDocuments
。
Their documentation to upload is http://docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html 他们要上传的文档是http://docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html
The request is documented here http://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CloudSearchDomain/TCloudSearchDomainUploadDocumentsRequest.html 该请求记录在此处http://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/CloudSearchDomain/TCloudSearchDomainUploadDocumentsRequest.html
I ended up using the Comb wrapper to handle the uploading, as it handles everything pretty handily in .NET. 我最终使用Comb包装器处理上传,因为它可以轻松处理.NET中的所有内容。 Pretty sure it uses the methods enumerated by dotcomly under the hood.
可以肯定的是,它使用了dotcomly枚举的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.