src/Graviton/DocumentBundle/Service/SolrQuery.php
private function getClient()
    {
        $endpointConfig = $this->urlParts;
        if (!isset($endpointConfig['path'])) {
            $endpointConfig['path'] = '/';
        }

        if (substr($endpointConfig['path'], -1) != '/') {
            $endpointConfig['path'] .= '/';
        }

        // find core name
        $classnameParts = explode('\\', $this->className);
        $endpointConfig['core'] = array_pop($classnameParts);

        $endpointConfig['timeout'] = 10000;
        $endpointConfig['key'] = 'local';

        $this->solrClient->addEndpoint($endpointConfig);
        $this->solrClient->setDefaultEndpoint($endpointConfig['key']);

        return $this->solrClient;
    }
private function getClient()
    {
        $endpointConfig = $this->urlParts;
        if (!isset($endpointConfig['path'])) {
            $endpointConfig['path'] = '/';
        }

        if (substr($endpointConfig['path'], -1) != '/') {
            $endpointConfig['path'] .= '/';
        }

        // find core name
        $classnameParts = explode('\\', $this->className);
        $endpointConfig['core'] = array_pop($classnameParts);

        $endpointConfig['timeout'] = 10000;
        $endpointConfig['key'] = 'local';

        $this->solrClient->addEndpoint($endpointConfig);
        $this->solrClient->setDefaultEndpoint($endpointConfig['key']);

        return $this->solrClient;
    }
private function getClient ( ) { $ endpointConfig = $ this -> urlParts ; if ( ! isset ( $ endpointConfig [ 'path' ] ) ) { $ endpointConfig [ 'path' ] = '/' ; } if ( substr ( $ endpointConfig [ 'path' ] , - 1 ) != '/' ) { $ endpointConfig [ 'path' ] .= '/' ; } // find core name $ classnameParts = explode ( '\\' , $ this -> className ) ; $ endpointConfig [ 'core' ] = array_pop ( $ classnameParts ) ; $ endpointConfig [ 'timeout' ] = 10000 ; $ endpointConfig [ 'key' ] = 'local' ; $ this -> solrClient -> addEndpoint ( $ endpointConfig ) ; $ this -> solrClient -> setDefaultEndpoint ( $ endpointConfig [ 'key' ] ) ; return $ this -> solrClient ; }
returns the client to use for the current query

@return Client client
returns the client to use for the current query