Question

I have an application and I've used Solarium for Solr. I have the configuration file:

public function getConfig()
{
    return array(
        'adapteroptions' => array(
            'host' => '127.0.0.1',
            'port' => 8983,
            'path' => '/solr/',
        ));
}

and it worked just fine. The problem I have now is that I've moved the application into another server and it seem that the port is changed. This are the dates I receive:

tomcat7 installed and solr 4.7.2. 
You cand check at www.mysite:8080/solr
user: mysiteuser password:mysitepass

So in my config file I've changed the port in 8080, but I get the following error:

Solr HTTP error: Unauthorized (401) 

Can someone help me to write the correct settings? How can I set the user and password?

Thank you

Was it helpful?

Solution

You should define it via the specific endpoint:

$client = new Solarium\Client($config);
$client->getEndpoint()->setAuthentication(SOLR_SERVER_USERNAME, SOLR_SERVER_PASSWORD);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top