PHPackages                             hejunjie/milvus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hejunjie/milvus

ActiveLibrary[Database &amp; ORM](/categories/database)

hejunjie/milvus
===============

一个轻量级的 PHP 库，用来通过 RESTful API 调用 Milvus 向量数据库，可以用它来管理集合、插入数据，以及进行向量搜索 | A lightweight PHP library for interacting with the Milvus vector database via RESTful API. It allows you to manage collections, insert data, and perform vector searches

v1.0.0(8mo ago)426MITPHP

Since Sep 3Pushed 6mo agoCompare

[ Source](https://github.com/zxc7563598/php-milvus)[ Packagist](https://packagist.org/packages/hejunjie/milvus)[ RSS](/packages/hejunjie-milvus/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

hejunjie/milvus
===============

[](#hejunjiemilvus)

 [English](./README.md)｜[简体中文](./README.zh-CN.md)---

A lightweight PHP library for interacting with the Milvus vector database via RESTful API. It allows you to manage collections, insert data, and perform vector searches.

**This project has been parsed by Zread. If you need a quick overview of the project, you can click here to view it：[Understand this project](https://zread.ai/zxc7563598/php-milvus)**

---

Installation
------------

[](#installation)

```
composer require hejunjie/milvus
```

---

Usage
-----

[](#usage)

Here is the basic usage. Full supported operations are listed below.

All methods are fully commented, and parameter details can be found in the corresponding method comments.

### Initialize Client

[](#initialize-client)

```
use Hejunjie\Milvus;

$client = new Milvus\Client($baseUrl, $apiKey);
```

### Create Collection

[](#create-collection)

```
$client->collections()->create(string $collectionName, array $schema, ?array $indexParams = null);
```

### Insert Data

[](#insert-data)

```
$client->entities()->insert(string $collectionName, array $data, ?string $partitionName = null);
```

### Vector Search

[](#vector-search)

```
$results = $client->entities()->search(string $collectionName, array $data, string $annsField);
```

---

Supported Methods
-----------------

[](#supported-methods)

- **Client** - Main entry point
    - **customize** - Custom requests
    - **collections** - Collection operations
        - **create** - Create a collection
        - **describe** - Get collection info
        - **drop** - Delete a collection
        - **get\_load\_state** - Get collection load state
        - **get\_stats** - Get collection stats
        - **has** - Check if a collection exists
        - **list** - List all collection names
        - **load** - Load a collection
        - **release** - Release a collection
        - **rename** - Rename a collection
        - **alter\_properties** - Set collection properties
        - **drop\_properties** - Remove collection properties
    - **partitions** - Partition operations
        - **create** - Create a partition
        - **drop** - Delete a partition
        - **get\_stats** - Get partition stats
        - **has** - Check if a partition exists
        - **list** - List partitions
        - **load** - Load a partition
        - **release** - Release a partition
    - **indexes** - Index operations
        - **create** - Create an index
        - **describe** - Get index info
        - **drop** - Delete an index
        - **list** - List all indexes
    - **aliases** - Alias operations
        - **alter** - Change an alias
        - **create** - Create an alias
        - **describe** - Describe an alias
        - **drop** - Delete an alias
        - **list** - List all aliases
    - **entities** - Vector data operations
        - **delete** - Delete data
        - **get** - Get data by primary key
        - **query** - Get data by filter expression
        - **insert** - Insert data
        - **upsert** - Update data
        - **search** - Search vector data

---

Motivation
----------

[](#motivation)

Normally, PHP rarely interacts with vector databases, but here's how it started: I was using a “slightly naughty” novel website with short stories of tens of thousands of words. The site was fine, but it limited me to reading only a few stories per day—and worse, it didn’t allow searching. Frustrated, I wrote a crawler and downloaded all the stories.

With so many novels, finding anything specific became nearly impossible. That’s when I thought of Milvus. My little 2-core, 2GB server couldn’t run a local deployment, not to mention vectorization. But fortunately, Milvus offers a managed service with a free tier. I could run the vectorization on my Mac and upload the data. Later, searches that required vectorized queries could use SiliconFlow’s free quota.

So, I needed a PHP library to operate Milvus, allowing the whole process to work smoothly—and making it easy to find the stories I wanted.

(The only issue is that the free quota isn’t very large—enough to store about 5GB of data—but it’s already sufficient, and it didn’t cost a thing)

---

Welcome
-------

[](#welcome)

If you find this library useful, feel free to ⭐ it, or submit issues/PRs. Discussion and feedback are always welcome.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

258d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b65d4b40ae456172fb38f63f84bf737ac88031484b1f228b1cc8d71baa80adf?d=identicon)[苏青安](/maintainers/%E8%8B%8F%E9%9D%92%E5%AE%89)

---

Top Contributors

[![zxc7563598](https://avatars.githubusercontent.com/u/46590942?v=4)](https://github.com/zxc7563598 "zxc7563598 (13 commits)")

### Embed Badge

![Health badge](/badges/hejunjie-milvus/health.svg)

```
[![Health](https://phpackages.com/badges/hejunjie-milvus/health.svg)](https://phpackages.com/packages/hejunjie-milvus)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
