public static function service($core = null)
    {
        $options = self::solr_options();

        if (!self::$service_singleton) {
            self::$service_singleton = Injector::inst()->create(
                $options['service'],
                $options['host'],
                $options['port'],
                $options['path']
            );
        }

        if ($core) {
            if (!isset(self::$service_core_singletons[$core])) {
                self::$service_core_singletons[$core] = self::$service_singleton->serviceForCore(
                    singleton($core)->getIndexName()
                );
            }

            return self::$service_core_singletons[$core];
        }
        return self::$service_singleton;
    }