Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

baidu/mochow-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

针对百度智能云向量数据库,我们推出了一套 JAVA SDK(下称Mochow SDK),方便用户通过代码调用百度向量数据库。

如何安装

使用Maven安装在Maven的pom.xml文件中添加mochow-sdk-java的依赖:

<dependency>    <groupId>com.baidu</groupId>    <artifactId>mochow-sdk-java</artifactId>    <version>{version}</version></dependency>

JAVA SDK可以在Java1.7,Java1.8环境下运行。

快速使用

在使用Mochow SDK 之前,用户需要在百度智能云上创建向量数据库,以获得 API Key。API Key 是用户在调用Mochow SDK 时所需要的凭证。具体获取流程参见平台的向量数据库使用说明文档

获取到 API Key 后,用户还需要传递它们来初始化Mochow SDK。 可以通过如下方式初始化Mochow SDK:

importcom.baidu.mochow.auth.Credentials;importcom.baidu.mochow.client.ClientConfiguration;importcom.baidu.mochow.client.MochowClient;publicclassMain {publicstaticvoidmain(String[]args) {Stringaccount ="root";StringapiKey ="your_api_key";Stringendpoint ="your_service_endpoint";// example: 127.0.0.1:5287// 创建Mochow服务的ClientClientConfigurationclientConfiguration =newClientConfiguration();clientConfiguration.setCredentials(newCredentials(account,apiKey));clientConfiguration.setEndpoint(endpoint);MochowClientmochowClient =newMochowClient(clientConfiguration);// 创建databasemochowClient.createDatabase("your_database_name");    }}

功能

目前Mochow SDK 支持用户使用如下功能:

  • Databse 操作
  • Table 操作
  • Alias 操作
  • Index 操作
  • Row 操作

License

Apache-2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp