I'm trying to add synonyms in CloudSearch via PHP SDK, but it's always returning "Invalid configuration". I'm using the same setting for Stopwords and it works fine.
My PHP:
use Aws\CloudSearch\CloudSearchClient;
$this->client = CloudSearchClient::factory(array(
'key' => MY_KEY,
'secret' => MY_SECRET,
'region' => 'us-east-1'
));
$result = $this->client->defineAnalysisScheme(array(
'DomainName' => MY_DOMAIN,
'AnalysisScheme' => array(
'AnalysisSchemeName' => MY_AnalysisSchemeName,
'AnalysisSchemeLanguage' => 'pt',
'AnalysisOptions' => array(
'Synonyms' => $words
),
),
));
My JSON ($ words):
{
"batman": [
"coringa",
"gordon",
"joker",
"robin"
],
"raul": [
"mango",
"mangolin"
]
}
If I enter this JSON directly into the AWS Console it works correctly.
Is there any parameter missing? Am I doing something wrong?