Download the PHP package qdrant-labs/qdrant-laravel-scout without Composer

On this page you can find all versions of the php package qdrant-labs/qdrant-laravel-scout. 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 qdrant-laravel-scout

Qdrant for Laravel Scout

A Qdrant driver for Laravel Scout with full-text, semantic, and hybrid search.

Requirements

Installation

Install the package with Composer:

Set the Scout driver and the Qdrant connection in your .env file:

Publish the configuration file to config/scout-qdrant.php:

Configuration

Add each searchable model to model-settings in config/scout-qdrant.php:

Scout creates the collection, its vectors, and its payload indexes the first time it indexes a model. You don't need to run scout:index.

Setting Use
searchable-attributes The attributes for full-text search. Qdrant generates one BM25 sparse vector from their values. Array attributes are included.
full-text Optional. The sparse vector name (vector, default bm25), the model (model, default qdrant/bm25), and model options.
embedding The dense vector for semantic and hybrid search. Set the vector name (attribute) and the dimensions. Optional keys are distance (default Cosine), driver, provider, model, and options. The options are provider options for the Laravel AI SDK or Qdrant inference.
payload-indexes The payload indexes to create, as field name and schema type. Use them for the fields that you filter or order on.
collection Optional. Extra collection parameters, such as HNSW, quantization, or strict mode settings.

Scout reads the vector settings only when it creates the collection. If you change searchable-attributes or embedding later, run scout:flush and then scout:import. Scout creates payload indexes that you add later on the next import.

The engine also indexes __scout_key and, when you use soft deletes, __soft_deleted.

Embeddings

By default, Scout generates embeddings with the Laravel AI SDK. Install it with composer require laravel/ai. The SDK requires PHP 8.3 or later. On PHP 8.2, use the qdrant driver below.

Add a toSearchableEmbedding method to the model. It returns the text to embed, or an embedding array that you have computed already:

To let Qdrant generate the embeddings with inference, set the qdrant driver and a model:

Dense model inference requires Qdrant Cloud Inference.

Usage

Full-text search

Semantic search

minSimilarity requires the Cosine or Dot distance.

Hybrid search

Hybrid search combines the full-text and semantic results with weighted Reciprocal Rank Fusion:

Filters and ordering

The engine supports where with the =, !=, <, <=, >, and >= operators, whereIn, and whereNotIn.

Filter values use the type of the field's payload index. On a field without an index, a number also matches its string form, and the reverse.

orderBy works on searches without a query string, such as Post::search(''). The field needs an integer, float, or datetime payload index.

Qdrant options

Pass Query API parameters with options:

Each model in the results has its Qdrant score in $post->scoutMetadata()['_qdrant_score'].

Pagination

Full-text, semantic, and hybrid searches return at most max_results results across all pages (default 1,000). Call take to change the maximum for one search. Searches without a query string have no maximum.

Limitations

License

Apache 2.0


All versions of qdrant-laravel-scout with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/database Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/scout Version ^11.6
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 qdrant-labs/qdrant-laravel-scout contains the following files

Loading the files please wait ...