Java SDK for Milvus. https://milvus.io
  • Java 99.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yhmo fa1c32d399
feat: notify runner-agent to review new PRs (#2176)
Signed-off-by: yhmo <yihua.mo@zilliz.com>
2026-11-06 12:25:55 +08:00
.github feat: notify runner-agent to review new PRs (#2176) 2026-11-06 12:25:55 +08:00
benchmark Add benchmark to compare performance difference between two sdk versions (#1766) 2026-03-04 17:45:17 +08:00
doc Reorg test cases and complete Javadoc coverage (#2082) 2026-09-16 16:01:30 +08:00
examples fix: element-filter QueryIterator offset seek and offset-column collision (#2165) 2026-11-05 10:49:52 +08:00
scripts Prepare for v3.0.10 and add run_examples batch script (#2083) 2026-09-16 18:41:26 +08:00
sdk-bulkwriter fix: keep double quotes in BulkWriter CSV values (#2168) 2026-11-05 18:33:53 +08:00
sdk-core fix: make MultiClientAsyncTest resilient to query-node visibility delay (#2171) 2026-11-05 17:57:52 +08:00
sdk-spring-boot-starter feat: add Spring Boot starter that auto-configures MilvusClientV2 (#2114) 2026-10-22 18:12:00 +08:00
tests fix: element-filter QueryIterator offset seek and offset-column collision (#2165) 2026-11-05 10:49:52 +08:00
tutorial Prepare for v3.0.12 (#2153) 2026-10-27 17:11:48 +08:00
.gitignore feat: add Spring Boot starter that auto-configures MilvusClientV2 (#2114) 2026-10-22 18:12:00 +08:00
.gitmodules Split to 2 packages (#1224) 2024-12-10 14:18:37 +08:00
AGENTS.md feat: add Spring Boot starter that auto-configures MilvusClientV2 (#2114) 2026-10-22 18:12:00 +08:00
CHANGELOG.md Prepare for v3.0.12 (#2153) 2026-10-27 17:11:48 +08:00
CODE_REVIEW.md Add code review.md (#216) 2021-11-05 10:29:53 +08:00
codecov.yml Add beginner tutorials consuming the published milvus-sdk-java artifact (#2075) 2026-09-09 14:55:22 +08:00
CONTRIBUTING.md Add auto-publish workflow (#1978) 2026-08-03 15:46:13 +08:00
DEVELOPMENT.md Refine pom files (#1805) 2026-04-15 18:53:36 +08:00
LICENSE Initial commit 2019-10-08 20:15:27 +08:00
OWNERS Add maintainer member (#327) 2022-07-08 16:28:17 +08:00
pom.xml Bump org.xerial.snappy:snappy-java from 1.1.10.7 to 1.1.10.9 (#2162) 2026-11-03 10:31:28 +08:00
README.md Prepare for v3.0.12 (#2153) 2026-10-27 17:11:48 +08:00
RELEASING.md Add auto-publish workflow (#1978) 2026-08-03 15:46:13 +08:00

Milvus Java SDK

Maven Central

Java SDK for Milvus. To contribute to this project, please read our contribution guidelines first.

Getting started

Prerequisites

-   Java 8 or higher
-   Apache Maven or Gradle

The following table shows compatibilities between Milvus and Java SDK.

Milvus version Java SDK version
2.0 2.0.4
2.1 2.1.0-beta4
2.2.0 ~ 2.2.8 2.2.0 ~ 2.2.5
>= 2.2.9 2.2.7 ~ 2.2.15
2.3.x 2.3.11
2.4.x 2.4.11
2.5.x 2.5.15
2.6.x 2.6.22
3.0.x 3.0.12

Install Java SDK

You can use Apache Maven or Gradle add Milvus SDK to your project.

  • Apache Maven

     <dependency>
         <groupId>io.milvus</groupId>
         <artifactId>milvus-sdk-java</artifactId>
         <version>3.0.12</version>
     </dependency>
    
  • Gradle/Groovy

    implementation 'io.milvus:milvus-sdk-java:3.0.12'
    
  • Gradle/Kotlin

    implementation("io.milvus:milvus-sdk-java:3.0.12")
    

From v2.5.2, milvus Java SDK is split into two packages: milvus-sdk-java and milvus-sdk-java-bulkwriter, because BulkWriter requires quite a lot of dependencies. If you don't need BulkWriter tool, you can ignore the milvus-sdk-java-bulkwriter package. To use BulkWriter, import milvus-sdk-java-bulkwriter to your project.

  • Apache Maven
```xml
 <dependency>
     <groupId>io.milvus</groupId>
     <artifactId>milvus-sdk-java-bulkwriter</artifactId>
     <version>3.0.12</version>
 </dependency>
```
  • Gradle/Groovy

    implementation 'io.milvus:milvus-sdk-java-bulkwriter:3.0.12'
    
  • Gradle/Kotlin

    implementation("io.milvus:milvus-sdk-java-bulkwriter:3.0.12")
    

For Spring Boot applications (Java 17+), the milvus-sdk-java-spring-boot-starter package auto-configures a MilvusClientV2 from milvus.* properties. See sdk-spring-boot-starter.

Examples

Please refer to examples folder for Java SDK examples.

Troubleshooting

  • If you encounter the following error when running your application:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    

    This is because SLF4J jar files need to be added into your application's classpath. SLF4J is required by Java SDK for logging purpose.

    To fix this issue, you can use Apache Maven or Gradle to download the required jar files.

    • Apache Maven

       <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-api</artifactId>
           <version>1.7.36</version>
       </dependency>
      
    • Gradle/Groovy

      implementation 'org.slf4j:slf4j-api:1.7.36'
      
    • Gradle/Kotlin

      implementation("org.slf4j:slf4j-api:1.7.36")
      

Development

For developers interested in contributing to the Milvus Java SDK, please refer to our DEVELOPMENT.md file. This document provides detailed instructions on:

  • Setting up your development environment
  • Cloning the repository
  • Building the SDK
  • Updating Milvus proto files
  • Running tests
  • Contributing guidelines

We welcome contributions from the community!