Install the package via Composer:
composer require codefabrik/qdrant-laravel
Publish the configuration file:
php artisan vendor:publish --tag="qdrant-laravel-config"
Configure the client in the .env file:
QDRANT_HOST=https://localhost
QDRANT_PORT=6333
QDRANT_COLLECTION=publicsearch
Create a client:
$qdrant = new QdrantClient();
Run actions:
$qdrant->collection()->create(1024, 'Cosine');
Check if the collection already exists
$qdrant->collection()->exists()
Create the collection
$qdrant->collection()->create(int $vectorSize, string $distanceMetric)
- vectorSize: the length of the vectors to store, e.g.
1024
- distanceMetric: the method for distance calculation, e.g.
Cosine
./vendor/bin/pest
./vendor/bin/pint
./vendor/bin/phpstan analyse