Download the PHP package klaasie/scout-solr-engine without Composer

On this page you can find all versions of the php package klaasie/scout-solr-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scout-solr-engine

Laravel Scout Apache Solr driver

GitHub issues Latest Stable Version License PHP Version Require

This package provides a basic implementation of the Apache Solr search engine within Laravel Scout.

Installation

composer require klaasie/scout-solr-engine

config

This package provides a config file that can be modified using .env variables.
You can initialize your own config file with:

php artisan vendor:publish --provider="Scout\Solr\ScoutSolrServiceProvider"

scout:index

By default, Solr doesn't allow indexes (cores) to be created without providing the proper folders and files on the file system first. However, if a default config set is set up in the Solr instance this becomes possible through the API.
The scout:index command will only work if the Solr instance is properly configured and the config files has the corresponding name for the config set folder. For more information, see https://solr.apache.org/guide/8_9/config-sets.html#config-sets

Cores (indexes)

Within the config file a core (index) is not provided. The engine will determine which core to connect to using the searchableAs() method on the model.

Alternatively, if a specific model is on a different Solr instance, another configuration can be provided for this model. It's important for the configuration key to match the searchableAs() of the model.

Solarium

This package uses solarium/solarium to handle requests to the solr instance. This app is meant to be a simple implementation of the laravel/scout engine. For complex queries to the solr instance I would recommend initializing your own Solarium client and use that package. Visit https://solarium.readthedocs.io/en/stable/ to view the documentation of the solarium package.

For convenience, any unknown methods used on the engine will be forwarded to the solarium client.

Events

The Solr Engine dispatches several events allowing you to hook into specific points in the engine.

Event Usage
Scout\Solr\Events\BeforeSelect Contains the Solr Solarium\QueryType\Select\Query\Query object and Scout Builder object. This event allows you to create complex queries using the Solarium package.
Scout\Solr\Events\BeforeSelect Contains the Solr Solarium\QueryType\Select\Result\Result object and Model object. This event allows you to create complex queries using the Solarium package.

Example

This repository provides an example laravel app showcasing the functionality of this package.
Please refer to the README.md of the example app for information on how to get it started.


All versions of scout-solr-engine with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
laravel/scout Version ^9.0|^10.0
solarium/solarium Version ^6.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package klaasie/scout-solr-engine contains the following files

Loading the files please wait ....