Download the PHP package mcpuishor/qdrant-laravel without Composer

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

Qdrant for Laravel

Introduction

This package provides an elegant, fluent interface for interacting with the Qdrant Vector Database in Laravel. Qdrant is a vector similarity search engine that makes it easy to store and search for embeddings, making it ideal for AI-powered applications.

Key features:

Installation

1. Install via Composer

2. Publish the Configuration File

This will create a config/qdrant-laravel.php file where you can set your Qdrant connections and defaults.

3. Set Up Your .env File

Update your .env file with your Qdrant host details:

Configuration

The config/qdrant-laravel.php file allows multiple connections:

Schema Management (Migrations)

Creating a new collection

A collection must contain at least one vector. An optional parameter options can contain additional parameters described as an associative array. See the Qdrant documentation for details. The options can be specified using arrays or DataObjects defined in the package.

The response is a boolean value, unless an exception is thrown.

Creating a new collection on a different connection

You can switch the connection at runtime. The connection must be defined in the config\qdrant-laravel.php file.

Creating a collection with multiple vectors

A collection can contain multiple vectors per point. They need to be passed on to the Schema::create as an array containing the definitions of each vector. The vectors can have different definitions. The optional parameters can be specified using Data Objects defined in the package.

Deleting a collection

To delete a collection, you can call the delete method on the Schema facade. It returns a Mcpuishor\QdrantLaravel\DTOs\Response object.

Collection existence

To check if the collection defined in the config on the current connection exists:

At the same time, you can check the existence of a different collection on the same connection:

Updating a collection

Updating parameters on an existing collection can be done in a similar fashion to creating one. The parameters updated can be specified using arrays or Data Objects defined in the package.

Updating the collection defined in the config\qdrant-laravel.php:

Indexing a collection

Indexes in a Qdrant vector collection are created on the payload for each vector. For more details see the Qdrant documentation.

Creating an index

To create a payload index over a field:

It returns true if the operation was successful, or false otherwise.

You can use dot notation to create indexes over nested fields.

By default, indexes are stored in memory. If you have large indexes, and they need to be stored on the disk, you can use the ->onDisk() method before creating the index. Choose carefully when to store an index on the disk, as this will introduce some latency in your future queries.

Parameterized integer indexes

Qdrant v1.8.0 has introduced a parameterized variant of the integer index. To turn the parameterized index on you can call the ->parameterized() method before creating an integer index. This setting is used only for integer fields in the payload.

Values of the lookup and range can be toggled in the config\qdrant-laravel.php file. For more information on parameterized integer indexes and how they affect performance check the Qdrant documentation

It returns true if the operation was successful, or false otherwise.

Full-text indexes

Qdrant supports full-text search for string payload. Full-text index allows you to filter points by the presence of a word or a phrase in the payload field.

It returnstrueif the operation was successful, orfalse`` otherwise.

Deleting an index

It returnstrueif the operation was successful, orfalse`` otherwise.

Searching

The package provides a fluent interface for searching vectors in your Qdrant collection.

Basic Vector Search

To perform a simple search with a vector:

Search by Point ID

You can also search for similar points to an existing point by its ID:

Including Payload and Vectors

Control what data is returned with your search results:

Pagination

Control the number of results and implement pagination:

Filtering Results

Apply filters to search results using the fluent filter API:

Grouping Results

Group search results by a payload field:

Batch Searching

Perform multiple searches in a single request:

Random Sampling

Get random points from the collection:

Using Named Vectors

If your collection has multiple named vectors, specify which one to use:

Recommendations

The package provides a recommendation system based on positive and negative examples.

Basic Recommendations

Get recommendations based on positive examples:

Positive and Negative Examples

Refine recommendations with both positive and negative examples:

Recommendation Strategy

Control how vectors are combined for recommendations:

Available strategies include:

Point Operations

The package provides methods for managing points in your Qdrant collection.

Retrieving Points

Get points by their IDs:

Controlling Returned Data

Control what data is returned with the points:

Inserting Points

Insert a new point into the collection:

Upserting Points

Insert or update multiple points:

Deleting Points

Delete points by their IDs:

Autochunking

Efficiently handle large numbers of points with automatic chunking:

Vector Operations

The package provides methods for managing vectors in your Qdrant collection.

Updating Vectors

Update vectors for existing points:

Deleting Vectors

Delete vectors for specific points:

Artisan Commands

Creating a Collection with indexes

Rolling Back a Migration (Dropping Collection & Indexes)

Extending with Macros

The query builder and client are Macroable, allowing custom methods:

Conclusion

This package simplifies working with Qdrant in Laravel, making it easy to integrate vector search and AI-powered applications. Contributions are welcome!


License

This package is open-source and available under the MIT License.


All versions of qdrant-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
illuminate/support Version ^10.0|^11.0|^12.0
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 mcpuishor/qdrant-laravel contains the following files

Loading the files please wait ....