spokesoftware / aws_cloud_search

Ruby implementation of the AWS CloudSearch 2011 API -- No longer maintained
Other
49 stars 24 forks source link

spec fail #2

Closed tranngocsam closed 12 years ago

tranngocsam commented 12 years ago

I'm very sorry, I'm new to aws cloud search.\ I cloned your gem and run "rake spec". There are 3 failing tests with the same error.

1) AWSCloudSearch::CloudSearch should send document batch Failure/Error: ds.documents_batch(batch) Faraday::Error::ParsingError: 743: unexpected token at 'doc-samtn-scene-search.us-east-1.cloudsearch.amazonaws.com

<body BGCOLOR='#FFFFFF'> This page requires that your browser supports frames. <BR>You can access the page without frames with this <a href='http://btdsde.com/?dn=doc-samtn-scene-search.us-east-1.cloudsearch.amazonaws.com'>link</A>. </body> ' # ./lib/aws_cloud_search/cloud_search.rb:18:in `documents_batch' # ./spec/aws_cloud_search/cloud_search_spec.rb:29:in`block (2 levels) in ' Could you show me what's wrong with me? I set CLOUDSEARCH_DOMAIN environment variable.
javmorin commented 12 years ago

You need to include the full id generated by amazon (which is your requested domain, a dash, and a random string of characters). For example, if in the console, your search endpoint is: "search-my-search-domain-kjh345th2398ehgehfg23h5tsa.us-east-1.cloudsearch.amazonaws.com"

Set your cloudsearch domain to "my-search-domain-kjh345th2398ehgehfg23h5tsa"

We're going to need to add something to the gem to try and identify that condition and report a more helpful error message.

tranngocsam commented 12 years ago

Thank you very much, that solves the issue.

djensen47 commented 12 years ago

Since this was resolved, I'm closing it.