我正在尝试使用FOSElasticaBundle(版本v6.0.0-beta4)连接到AWS Elasticsearch域。根据文档,这个包使用ruflin/Elastica包。在研究了这里的文档和相关问题后,我可以找到一些我实现的示例和配置,但是,我得到了一个与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...)
在填充索引时,我得到了与AwsAuthV 4传输参数相关的错误:
In AwsAuthV4.php line 43:
Attempted to load class "SignatureV4" from namespace "Aws\Signature".
Did you forget a "use" statement for another namespace?
我不确定这是否不受支持、配置不正确或其他原因。
2条答案
按热度按时间zc0qhyus1#
请确保在使用
FOSElasticaBundle
时,您还安装了名为aws/aws-sdk-php
的软件包。这个包将保证类Aws\Signature\SignatureV4
也将被加载。如果你仍然有这个问题,记得在控制台中执行
composer dump-autoload
。xeufq47z2#
@Eddy是现有的elastica捆绑工程AWS opensearch?