1
I’m trying to add synonyms in Cloudsearch via PHP SDK, but it’s always returning "Invalid Configuration". I am using the same configuration for Stopwords and it works normally.
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 insert this JSON directly into the AWS Console it works correctly.
Are any parameters missing? I’m doing something wrong?
That’s what it was. I had even tried to pass aliases, but as I moved so much I must have changed something else. Now it worked. Thanks.
– Raul Mangolin