35 Commits

Author SHA1 Message Date
congqixia
1e48911825
enhance: [GoSDK] Support struct array field type (#45291)
Related to #42148

Add comprehensive support for struct array field type in the Go SDK,
including data structure definitions, column operations, schema
construction, and full test coverage.

**Struct Array Column Implementation (`client/column/struct.go`)**
- Add `columnStructArray` type to handle struct array fields
- Implement `Column` interface methods:
- `NewColumnStructArray()`: Create new struct array column from
sub-fields
  - `Name()`, `Type()`: Basic metadata accessors
  - `Slice()`: Support slicing across all sub-fields
  - `FieldData()`: Convert to protobuf `StructArrayField` format
  - `Get()`: Retrieve struct values as `map[string]any`
  - `ValidateNullable()`, `CompactNullableValues()`: Nullable support
- Placeholder implementations for unsupported operations (AppendValue,
GetAsX, IsNull, AppendNull)

**Struct Array Parsing (`client/column/columns.go`)**
- Add `parseStructArrayData()` function to parse `StructArrayField` from
protobuf
- Update `FieldDataColumn()` to detect and parse struct array fields
- Support range-based slicing for struct array data

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-11-05 15:43:33 +08:00
cai.zhang
19346fa389
feat: Geospatial Data Type and GIS Function support for milvus (#44547)
issue: #43427

This pr's main goal is merge #37417 to milvus 2.5 without conflicts.

# Main Goals

1. Create and describe collections with geospatial type
2. Insert geospatial data into the insert binlog
3. Load segments containing geospatial data into memory
4. Enable query and search can display  geospatial data
5. Support using GIS funtions like ST_EQUALS in query
6. Support R-Tree index for geometry type

# Solution

1. **Add Type**: Modify the Milvus core by adding a Geospatial type in
both the C++ and Go code layers, defining the Geospatial data structure
and the corresponding interfaces.
2. **Dependency Libraries**: Introduce necessary geospatial data
processing libraries. In the C++ source code, use Conan package
management to include the GDAL library. In the Go source code, add the
go-geom library to the go.mod file.
3. **Protocol Interface**: Revise the Milvus protocol to provide
mechanisms for Geospatial message serialization and deserialization.
4. **Data Pipeline**: Facilitate interaction between the client and
proxy using the WKT format for geospatial data. The proxy will convert
all data into WKB format for downstream processing, providing column
data interfaces, segment encapsulation, segment loading, payload
writing, and cache block management.
5. **Query Operators**: Implement simple display and support for filter
queries. Initially, focus on filtering based on spatial relationships
for a single column of geospatial literal values, providing parsing and
execution for query expressions.Now only support brutal search
7. **Client Modification**: Enable the client to handle user input for
geospatial data and facilitate end-to-end testing.Check the modification
in pymilvus.

---------

Signed-off-by: Yinwei Li <yinwei.li@zilliz.com>
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
Co-authored-by: ZhuXi <150327960+Yinwei-Yu@users.noreply.github.com>
2025-09-28 19:43:05 +08:00
Tianx
c0d62268ac
feat: add timesatmptz data type (#44005)
issue: https://github.com/milvus-io/milvus/issues/27467
>
https://github.com/milvus-io/milvus/issues/27467#issuecomment-3092211420
> * [x]  M1 Create collection with timestamptz field
> * [x]  M2 Insert timestamptz field data
> * [x]  M3 Retrieve timestamptz field data
> * [x]  M4 Implement handoff[ ]  

The second PR of issue:
https://github.com/milvus-io/milvus/issues/27467, which completes M1-M4
described above.

---------

Signed-off-by: xtx <xtianx@smail.nju.edu.cn>
2025-08-26 15:59:53 +08:00
zhuwenxing
71dc135289
test: add rerank function testcases in go client (#43891)
/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
2025-08-19 14:57:48 +08:00
groot
d0eabf0807
enhance: add FunctionTypeRerank for Go SDK (#42659)
Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-06-13 17:12:36 +08:00
cqy123456
317bbfbf81
enhance: milvus support minhash vector and mhjaccard metric (#42036)
issue:
https://github.com/issues/assigned?issue=milvus-io%7Cmilvus%7C41746

Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
2025-06-10 14:38:34 +08:00
groot
b0f4b904cd
enhance: add multiAnalyzerParams for Go SDK (#41814)
relate: https://github.com/milvus-io/milvus/issues/41213

Signed-off-by: yhmo <yihua.mo@zilliz.com>
2025-05-14 16:34:22 +08:00
aoiasd
24eb70f382
enhance: [GOSDK] support run analyzer for go client (#39973)
relate: https://github.com/milvus-io/milvus/issues/39705

---------

Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
2025-04-21 10:24:40 +08:00
congqixia
4d37b2870d
enhance: [GoSDK] Add more example for godoc (#41234)
Related to #31293

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-04-11 13:26:26 +08:00
ThreadDao
aaf8ddcec6
test: add cases for go client rbac APIs (#40352)
issue: #33419
- add cases for go client rbac APIs
- add dbName params for grant/revoke v1 & v2 api
- add dbName in GrantItem

---------

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
2025-03-13 14:28:08 +08:00
congqixia
c348e61bdb
fix: [GoSDK] move metaheader to client in case of race (#40443)
See failure run in #40352

This PR:
- move metaheader map to client struct from config
- set default value for field schema

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-03-07 17:06:02 +08:00
congqixia
16bc2e8087
enhance: [GoSDK] support update ts caching policy (#40381)
Related to #39093

This PR add update timestamp check and retry policy according to the
design of the related issue

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-03-05 21:36:08 +08:00
congqixia
5b0881c93d
enhance: [GoSDK] Add DescribeReplica API & sync rbac v2 (#40373)
Related to #31293 #37031

This PR:
- Add DescribeReplica API
- Add unified RBAC v2 API names(AddPrivilegesToGroup,
RemovePrivilegesFromGroup, GrantPrivilegeV2, RevokePrivilegeV2)
- Mark old ones deprecated

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-03-05 21:34:11 +08:00
congqixia
c02763d49a
fix: [GoSDK] Pass only valid data for nullable column (#40328)
Related to #40327

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-03-04 20:58:04 +08:00
congqixia
ce480c3f57
enhance: [GoSDK] Use pkg v2 module path (#40134)
Related to #39095
Previous PR #39990 update pkg module path using "/v2" package name, this
PR update milvusclient go sdk dependency for this update

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-02-25 10:33:56 +08:00
congqixia
f391ea136e
enhance: [GoSDK] Add WithEnableMatch syntactic sugar (#39837)
Related to #35922

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-02-13 15:50:47 +08:00
Cai Yudong
f32830e016
feat: Support restful & go sdk for Int8Vector (#39278)
Issue: #38666

Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
2025-01-24 17:07:07 +08:00
Cai Yudong
5bf1b2b929
feat: Support Int8Vector in go (#38990)
Issue: #38666

Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
2025-01-14 20:43:06 +08:00
congqixia
4966230d86
enhance: [GoSDK] Support Resource Group Controlling APIs (#38940)
Related to #30647

This PR add APIs:

- DescribeResourceGroup
- UpdateResourceGroup
- TransferReplica

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2025-01-03 18:12:54 +08:00
congqixia
c39452f384
enhance: [GoSDK] Support alter properties APIs (#38812)
Related to #31293

This PR:

- Add AlterDatabaseProperties API
- Add DropDatabaseProperties API
- Add DescribeDatabase API
- Rename AlterCollection to AlterCollectionProperties
- Add DropCollectionProperties API
- Add AlterCollectionFieldProperties API

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-27 18:26:50 +08:00
congqixia
a882f341f4
enhance: [GoSDK] Add APIs for backup tool (#38791)
Related to #31291

This PR:

- Add Backup&Restore RBAC APIs
- Add GetPersistentSegmentInfo API
- Add GetServerVersion API
- Add flush task stats

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-27 14:20:51 +08:00
congqixia
c39db11509
enhance: [GoSDK] Sync API names and add missing APIs (#38603)
Related to #31293

- Rename `UsingDatabase` to `UseDatabase`
- Uncomment default value methods
- Add missing RBAC APIs
- Add some resource group APIs

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-12-20 11:52:46 +08:00
sthuang
6f1b1ad78b
enhance: [GoSDK] add operate privilege & privilege group API (#38141)
related issue: https://github.com/milvus-io/milvus/issues/37031

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
2024-12-03 18:32:40 +08:00
congqixia
fdea7a7898
enhance: [GoSDK] Refine float point conversion precision loss ut (#38097)
Previous PR: #37978

This unit test is unable due to dim is a random number. When dim is
large enough precision loss will be greater than 0.04

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-11-29 16:54:36 +08:00
Yinzuo Jiang
1ce609834a
feat: [GoSDK] fp32 <-> fp16/bf16 vector conversion (#37978)
Add the following methods for convenient fp32 vector <-> fp16/bf16
vector conversion

fp32 <-> fp16/bf16 vector conversion:

- `func (fv FloatVector) ToFloat16Vector() Float16Vector`
- `func (fv FloatVector) ToBFloat16Vector() BFloat16Vector`
- `func (fv Float16Vector) ToFloat32Vector() FloatVector`
- `func (fv BFloat16Vector) ToFloat32Vector() FloatVector`

`columnBasedDataOption`:

- `func (opt *columnBasedDataOption) WithFloat16VectorColumn(colName
string, dim int, data [][]float32) *columnBasedDataOption`
- `func (opt *columnBasedDataOption) WithBFloat16VectorColumn(colName
string, dim int, data [][]float32) *columnBasedDataOption`

`ColumnFloat16Vector`/`ColumnBFloat16Vector`:

- `func NewColumnFloat16VectorFromFp32Vector(fieldName string, dim int,
data [][]float32) *ColumnFloat16Vector`
- `func NewColumnBFloat16VectorFromFp32Vector(fieldName string, dim int,
data [][]float32) *ColumnBFloat16Vector`
- support []float32 or `entity.FloatVector` in
    - `func (c *ColumnFloat16Vector) AppendValue(i interface{}) error`
    - `func (c *ColumnFloat16Vector) AppendValue(i interface{}) error`

issue: #37448

Signed-off-by: Yinzuo Jiang <yinzuo.jiang@zilliz.com>
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
2024-11-29 08:00:37 +08:00
congqixia
24c6a4bb29
enhance: [GoSDK] support Doc-in-doc-out APIs (#37590)
Related to #35853

This PR contains following changes:

- Add function and related proto and helper functions
- Remove the insert column missing check and leave it to server
- Add text as search input data
- Add some unit tests for logic above

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-11-12 10:58:28 +08:00
congqixia
e6cb7d6695
enhance: [GoSDK] Add collection alias & rename API (#36990)
Related to #31293

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-10-21 18:45:33 +08:00
congqixia
b86d795d6d
enhance: [GoSDK]Support specifying field schema to be cluster key (#35027)
See also #32939 milvus-io/milvus-sdk-go#794

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-07-26 20:01:45 +08:00
ThreadDao
be23495233
test: add cases got gosdk v2 search and databases (#34204)
issue: #33952 #33627 #33419

---------

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
2024-06-27 09:40:08 +08:00
ThreadDao
a77e2951af
test: add cases for go milvusclient query (#33884)
issue: #33419

---------

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
2024-06-26 09:52:04 +08:00
ThreadDao
ac5e098e13
feat: Add e2e test cases for GoSDK (#33378)
- Add e2e test cases for Go `milvusclient`
- Fix client SparseEmbedding to vector
issue: #33419

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
2024-06-04 10:57:47 +08:00
congqixia
33144a43d4
enhance: Support Row-based insert for milvusclient (#33270)
See also #31293

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-22 19:15:40 +08:00
congqixia
7eeb120aab
enhance: Add lint rules for client pkg and fix problems (#33180)
See also #31293

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-20 20:47:38 +08:00
congqixia
1ef975d327
enhance: Update latest sdk update to client pkg (#33105)
Related to #31293
See also milvus-io/milvus-sdk-go#704 milvus-io/milvus-sdk-go#711 
milvus-io/milvus-sdk-go#713 milvus-io/milvus-sdk-go#721
milvus-io/milvus-sdk-go#732 milvus-io/milvus-sdk-go#739 
milvus-io/milvus-sdk-go#748

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-17 10:39:37 +08:00
congqixia
244d2c04f6
feat: Add milvusclient package and migrate GoSDK (#32907)
Related to #31293

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
2024-05-10 18:01:30 +08:00