使用Yii2在solarium中放置/查找schema.xml和其他配置文件的位置


Where to put/find schema.xml and other config files in solarium using Yii2?

我正试图在Yii 2 Framework下通过solarium使用Solr,在谷歌上搜索了很多小时后,我仍然不知道配置文件在哪里。

我只有日光浴室文件夹下的供应商,

--- vendor
  --- solarium 
    --- solarium 
    --- examples 
    --- library 
    --- phar
    --- tests 
    ...

但是我不知道如何添加配置文件,如果我需要创建多个索引/核心该怎么办。

感谢

尝试使用yii2solr包。您需要从他们的网站将这些配置添加到@app/config/main.php文件中。

'components' => [
    ...
    'solr' => [
        'class' => 'sammaye'solr'Client',
        'options' => [
            'endpoint' => [
                'solr1' => [
                    'host' => '10.208.225.66',
                    'port' => '8983',
                    'path' => '/solr'
                ]
            ]
        ]
    ],
    ...
]