0

I'm trying to use Solr through solarium under Yii 2 Framework, after Googling for many hours i still don't know where is the config files.

I only have solarium folder under vendor,

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

but i don't know how to add the config files, and what if i need to create multiple indexes/cores.

Thanks

Tariq Albajjali
  • 327
  • 1
  • 6
  • 16

1 Answers1

0

Try using the yii2-solr package. From their website, you need to add these configurations to your @app/config/main.php file.

'components' => [
    ...
    'solr' => [
        'class' => 'sammaye\solr\Client',
        'options' => [
            'endpoint' => [
                'solr1' => [
                    'host' => '10.208.225.66',
                    'port' => '8983',
                    'path' => '/solr'
                ]
            ]
        ]
    ],
    ...
]
Igbanam
  • 5,904
  • 5
  • 44
  • 68
  • I am using it already, but i don't know how to add the config files, and what if i need to create multiple indexes/cores, i can't find these information in there document. – Tariq Albajjali Apr 07 '15 at 11:28
  • You should add such information to your question (about using specific extension). – arogachev Apr 07 '15 at 11:34
  • @Dev.Tareq read my answer properly, The configuration goes into any of Yii's config files which is autoloaded. Either `@app/config.main.php` or `@common/config/main.php` – Igbanam Apr 07 '15 at 16:12