我正在尝试使用FOSLasticaBundle(版本v6.0.0-beta4(连接到AWS Elasticsearch域。根据文档,此bundle使用ruflin/Elastica bundle。在研究了这里的文档和相关问题后,我可以找到一些我实现的示例和配置,然而,我遇到了一个与elastica配置有关的错误。我的配置:
//config/packages/fos_elastica.yaml
fos_elastica:
clients:
default:
url: 'aws-elasticsearch-domain-url'
aws_access_key_id: 'access-key'
aws_secret_access_key: 'secret-key'
aws_region: "aws-region"
transport: "AwsAuthV4"
indexes:
(indexes configuration...)
在填充索引时,我得到了与AwsAuthV4传输参数相关的错误:
In AwsAuthV4.php line 43:
Attempted to load class "SignatureV4" from namespace "AwsSignature".
Did you forget a "use" statement for another namespace?
我不确定这是不受支持、配置不正确还是其他原因。
确保在使用FOSElasticaBundle
时还安装了名为aws/aws-sdk-php
的软件包。这个包将保证calssAwsSignatureSignatureV4
也将被加载。
如果您仍然有这个问题,请记住在控制台中执行composer dump-autoload
。