AWS CloudSearch错误取消激活响应

时间:2017-07-26 06:51:48

标签: amazon-web-services amazon-cloudsearch

我似乎正在反对CloudSearch的一些限制,我无法弄清楚。我在.NET工作,我的情况是有大量的播放列表'我希望在搜索中允许,这使得查询很长,但它似乎在大多数情况下都有效。但是在某些情况下,我收到一个我不完全理解的错误。这是堆栈跟踪:

Amazon.Runtime.AmazonUnmarshallingException: Error unmarshalling response back from AWS.  ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Amazon.Runtime.Internal.Transform.JsonErrorResponseUnmarshaller.Unmarshall(JsonUnmarshallerContext context) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Internal\Transform\JsonErrorResponseUnmarshaller.cs:line 103
   at Amazon.CloudSearchDomain.Model.Internal.MarshallTransformations.SearchResponseUnmarshaller.UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Services\CloudSearchDomain\Generated\Model\Internal\MarshallTransformations\SearchResponseUnmarshaller.cs:line 92
   at Amazon.Runtime.Internal.Transform.JsonResponseUnmarshaller.UnmarshallException(UnmarshallerContext input, Exception innerException, HttpStatusCode statusCode) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Internal\Transform\ResponseUnmarshallers.cs:line 198
   at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\HttpErrorResponseExceptionHandler.cs:line 78
   --- End of inner exception stack trace ---
   at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException(IExecutionContext executionContext, HttpErrorResponseException exception) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\HttpErrorResponseExceptionHandler.cs:line 111
   at Amazon.Runtime.Internal.ExceptionHandler`1.Handle(IExecutionContext executionContext, Exception exception) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\ExceptionHandler.cs:line 38
   at Amazon.Runtime.Internal.ErrorHandler.ProcessException(IExecutionContext executionContext, Exception exception) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:line 204
   at Amazon.Runtime.Internal.ErrorHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:line 78
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CallbackHandler.cs:line 45
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.Signer.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\Signer.cs:line 38
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.CredentialsRetriever.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CredentialsRetriever.cs:line 72
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.RetryHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\RetryHandler\RetryHandler.cs:line 84
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CallbackHandler.cs:line 45
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.EndpointResolver.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\EndpointResolver.cs:line 34
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.Marshaller.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\Marshaller.cs:line 37
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.CloudSearchDomain.Internal.ProcessRequestHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Services\CloudSearchDomain\Custom\Internal\ProcessRequestHandler.cs:line 26
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CallbackHandler.cs:line 45
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\ErrorCallbackHandler.cs:line 44
   at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\PipelineHandler.cs:line 55
   at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\MetricsHandler.cs:line 40
   at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\RuntimePipeline.cs:line 135
   at Amazon.Runtime.AmazonServiceClient.Invoke[TRequest,TResponse](TRequest request, IMarshaller`2 marshaller, ResponseUnmarshaller unmarshaller) in E:\JenkinsWorkspaces\v3-trebuchet-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\AmazonServiceClient.cs:line 192
   at Amazon.CloudSearchDomain.AmazonCloudSearchDomainClient.Search(SearchRequest request) in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Services\CloudSearchDomain\Generated\_bcl35\AmazonCloudSearchDomainClient.cs:line 132
   at SPTR.Gamut.Data.AWS.AwsCore.GetSearchResult(String searchString, Int32& totalFound, List`1& facets, Nullable`1 searchType, Boolean paginateAsList) in C:\RD\Commercial Software\SPECtrum\Gamut\Code\GamutBase\Data\AWS\AwsCore.cs:line 1427
   at SPTR.Gamut.SearchVM.DoSearch() in C:\RD\Commercial Software\SPECtrum\Gamut\Code\GamutBase\SearchVM.cs:line 224

问题是,如果我没有刻面,它可以正常工作,只要我打开任何方面它就会出错。此外,如果我减少到100个播放列表而不是150并打开分面也可以正常工作。这一切都让我相信它有一些限制,它会引发错误。

以下是获得错误的数据:

查询(结构解析器):(或(术语'门')(前缀提升= 0.25'门')(和(或术语'门') )(前​​缀提升= 0.25'门'))(术语字段= favoritedusers boost = 1.5' 9219cfe5-9756-45e7-ae15-b5ca73748404')))

FilterQuery :(和(或主题演讲:' 08710')objecttype:' 10'(或播放列表:' 9i2frcy8'播放列表:' uwpvqyxh&# 39;播放列表:'做广告播放列表:' 2gqii0go'播放列表:' 8qj8cgvw'播放列表:' l8a56uvd'播放列表:' 8lf98mhe&# 39;播放列表:' 0f7giujd'播放列表:' ut1qckaj'播放列表:' h4dbj7s9'播放列表:' c9mm1dm6'播放列表:' mjp0frtb&# 39;播放列表:' j2ndnbri'播放列表:' f854hpfj'播放列表:播放列表:' 8ox2i76j'播放列表:' 9cwmleut&# 39;播放列表:' ny6cev1u'播放列表:' 1m4x5i1x'播放列表:' ge251k0f'播放列表:' ylne2cy8'播放列表:' nvwwpybx&# 39;播放列表:' xy3vlw6k'播放列表:' 4je6ema4'播放列表:' rxb4jvuf'播放列表:' be0cqgih'播放列表:' h448us7o&# 39;播放列表:' fq6ruon1'播放列表:' 101svsr1'播放列表:播放列表:' u0h2bspq'播放列表:' usoj1juy '播放列表:' 8hrw4h8o'播放列表:' gr4n8x6a'播放列表:' k8qy3c5r'播放列表:' 3wcgj6qp'播放列表:' slqorl5t'播放列表:' y5tyrdgy'播放列表:' 681wh04e'播放列表:' dvp6mqor'播放列表:' r5fe7di4'播放列表:' fmtm0hn2'播放列表:' q96rvp4q'播放列表:' 5p8c1v8o'播放列表:' vivmluko'播放列表:' wtneponn'播放列表:' qeok75fn'播放列表:' jni0x45c'播放列表:' y9oh506q'播放列表:' sgu0t3ta'播放列表:' llk4ic2w'播放列表:' 2o0rh2yn'播放列表:' 6nfvkcx2'播放列表:' jyg2cymq'播放列表:' olqvouu4'播放列表:' 8q2t2eoo'播放列表:' jxu400y7'播放列表:' uy7vi8f0'播放列表:' p1deaf2h'播放列表:' 70t9gpra'播放列表:' 4x8xwypa'播放列表:' xrwwdfo4'播放列表:' xjwwydlm'播放列表:' nmgdgjxp'播放列表:' 5n0galk7'播放列表:' avg3g9w7'播放列表:' 4hi5qxbf'播放列表:' 82v4tmgr'播放列表:' 8kl1sguf'播放列表:' 2vm68mfv'播放列表:' i2c5bt61'播放列表:' ibdrl9w8'播放列表:' dxnn2y0y'播放列表:' faqqq80p'播放列表:' tlsad9cx'播放列表:' 6xuqmi30'播放列表:' qtkibnnv'播放列表:' jgbp6ux7'播放列表:' hmekjdg6'播放列表:' scgkd7i7'播放列表:' quup0wig'播放列表:' ux42kss3'播放列表:' 828u9ir1'播放列表:' bx8eevau'播放列表:' mhe0g4a4'播放列表:' mp15xd5c'播放列表:' qedatlm7'播放列表:' dxtbs3wy'播放列表:' g5n8jtai'播放列表:' dmbexfiq'播放列表:' suvegdq7'播放列表:' imx2ahs6'播放列表:' 3ijkufbe'播放列表:' 4keg8svd'播放列表:' w24ddnig'播放列表:' ytvlqovy'播放列表:' xpwypcof'播放列表:' wa8nnfck'播放列表:' p7vv2osu'播放列表:' s0tamtvw'播放列表:' 5322h108'播放列表:' fcq853br'播放列表:' ev4etn0y'播放列表:' s71e1rq9'播放列表:' t1bmhv5v'播放列表:' wd54ybpa'播放列表:' ta76327c'播放列表:' 6ca3h73p'播放列表:' cv0dn0i0'播放列表:' smil74bn'播放列表:' 1o1y133q'播放列表:' 4fr5cj6h'播放列表:' 49h3ybcc'播放列表:' 9g891fdi'播放列表:' i01h0dit'播放列表:' 1n0mx1gs'播放列表:' q2oea37k'播放列表:' f0v6r6yn'播放列表:' d1lao5gp'播放列表:' bgaa5ix3'播放列表:' lg4tttop'播放列表:' 2b8sl742'播放列表:' 6uqj5dl7'播放列表:' 3t9cb7wj'播放列表:' gylul16i'播放列表:' 3xgjgmw7'播放列表:' epk4pc39'播放列表:' wmcmovnk'播放列表:' ko2jphlb'播放列表:' u87cgxct'播放列表:' cs1lsia4'播放列表:' i2jjsa7r'播放列表:' rr3161xq'播放列表:' d6oemfis'播放列表:' 4o8gd9he'播放列表:' wrrl3e2s'播放列表:' 5bt9n80s'播放列表:' 2mwvrovm'播放列表:' rc17tj4d'播放列表:' y4sprfou'播放列表:' 06hluw5h'播放列表:' d22u2nfn'播放列表:' tx97dgvo'播放列表:' 2kb85l0g'播放列表:' 30 amwf4j'播放列表:' u3yu0euy'播放列表:' sh9sf9yj'播放列表:' cbah1wub'播放列表:' kbbwdo2p'播放列表:' xio2uj1m'播放列表:' eshkknye'))

方面:{"类别":{},"汇编代码":{},"主题演讲":{桶:[" 08710&#34 ;]}," omniclass":{},"播放列表":{},"状态":{}," workplanebased":{ }," host":{}," sourcefile":{}}

查询选项:{"字段":["汇编代码^ 1"," assemblydescription ^ 1"," category ^ 1", "文件名^ 1.5""基调^ 1""关键字^ 1.5""名称^ 1.5"&#34 ; omniclass ^ 1"" omniclasstitle ^ 1"" parametersearchvalues ^ 0.5"]}

我找到了页面http://docs.aws.amazon.com/cloudsearch/latest/developerguide/limits.html并查看了它。但是我没有看到我要打的限制。我没有1024条款,我有大约150条。获取最大值为8190字节;我已经添加了我的字符串,它达到了大约3500个字符。我不确切知道CloudSearch API是如何格式化的,但我怀疑它的长度会增加一倍。

有谁能告诉我我遇到的问题是什么?还有一个很好的方法在.NET SDK中计算get的字节数,以确保我没有达到这个目的吗?

1 个答案:

答案 0 :(得分:0)

好吧我还是不知道限制是什么,但我找到了解决问题的方法。我在这里发布它作为答案,以帮助其他任何人处理这种情况或类似的事情,但如果有人知道我打击的限制或如何更好地处理这个,我会接受这个答案...

所以我最终将我的搜索分成多个请求。基本上,如果播放列表的列表超过100,我将其分成100个播放列表的块并提交每个块的请求。然后我从每个结果集中取出结果集并将它们放回到最终结果集中。如果您打算使用此方法,我会注意到一些项目:

  • 当然,当你多次搜索时,它会慢一点。
  • 如果您正在进行分页,则需要存储每个搜索请求/响应对象以获取下一个集合而不只是一个,并在获取下一页时执行相同的操作。
  • 搜索质量可能会降低。如果从2个不同的组中拉出前5名,则无法保证它将成为整体中的前10名。第2组中的前5名可能在整体中排名为30-35,但在分组结果集中显示为6-10。

在我的情况下,虽然这些并不理想,但它们是可接受的限制......