Giter Club home page Giter Club logo

milvus-sdk-go's Introduction

Milvus Go SDK

license Mergify Status Go Reference

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

SDK versions

Milvus version Recommended Go SDK version
2.3.x 2.3.1
2.2.x 2.2.8
2.1.0 2.1.0
2.0.0 2.0.0
1.1.x 1.1.0
1.0.x 1.0.0

Note: Major versions is NOT compatible between Milvus and SDK

Getting started

Prerequisites

Go 1.17 or higher

Install Milvus Go SDK

  1. Use go get to install the latest version of the Milvus Go SDK and dependencies:

    go get -u github.com/milvus-io/milvus-sdk-go/v2
  2. Include the Milvus Go SDK in your application:

    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    
    //...other snippet ...
    client, err := client.NewClient(context.Background(), client.Config{
       Address: "localhost:19530",
    })
    if err != nil {
        // handle error
    }
    defer client.Close()
    
    client.HasCollection(context.Background(), "YOUR_COLLECTION_NAME")

API Documentation

Refer to https://milvus.io/api-reference/go/v2.2.x/About.md for the Go SDK API documentation.

Examples

See examples about how to use this package to communicate with Milvus

Code format

The Go source code is formatted using gofmt and golint.

milvus-sdk-go's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

milvus-sdk-go's Issues

[QUESTION] Milvus version

Hello!
Could you tell me please what happened with 11.0 milvus? Its weird by it looks like deprecated, but 10.5 looks like actual. Which version should i take? I also ask because golang sdk 0.45 using float32 in Entity struct ->
it probably means less accurate search and i need float64 - but it is only in the sdk version 5.0.0 for milvus version 11.0.
Please help:)

Sorry if this is a frequent question

grpc client file structure too vague

grpcClient has lots of function implementing Client interface. Currently they are organized into dm/dd file but the criteria is vague and hard to understand.
The APIs shall be organized into the object it manipulates format say client_grpc_collection.go contains all the functions related to Collection manipulation.

Search returns error when using index

Search with index returns error with such message

Error in virtual milvus::knowhere::DatasetPtr milvus::knowhere::I

It's actually caused by params with wrong value type,say params = {"nprobe": "8"}, while correct params should be {"nprobe": 8}
note 8 should be number instead of string

Flush API async flag failed

API client.Flush, with async set to false, needs to wait until all the segments pre-created is flushed.
The checking condition is not correct since GetPersistentSegmentInfo will not returns unflushed segments info.

Row based API set support

The API draft has only column-based API while row based logic is more familiar to Gophers. Row based API should be supported for trial

Unittest needed

milvus-sdk-go should have ut to verify client side behavior

  • client package unit test
  • entity package unit test
  • coverage over 80%

Index wrapper not fully implemented

The Index interface has only flatIndex and GenericIndex implementation for now.
All the supported index type and related metric/param constraint shall be implemented.

Example needed

A rough draft version is accomplished but there is no example to demonstrate how to use this SDK. tests package should be the integrated test code with milvus. An example package is needed to demonstrate the usage cases.

CreateIndex need async param

Like Insert, Flush, CreateIndex needs a async flag to indicating whether the API call should wait for index building process is complete

go.mod version not compatible to standard

According to go version semantic standard, the package module name shall be github.com/milvus-io/milvus-sdk-go/v2 instead of github.com/milvus-io/milvus-sdk-go. All package import shall be changed as well

Too many columns_xxx.go file

The columns_xxx.go is auto generated for each FieldType. But one field per type is to clumsy. It should be organized like indexes.

Client parameter constraint not checked

There are several parameter constraint in pymilvus/pymilvus-orm, say create collection name must not exist in current mivus instance, etc.
The go sdk should have the same behavior.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.