Skip to content

Commit 7d31156

Browse files
authored
feat: Support Milvus partition names (#39)
Signed-off-by: Anush008 <anushshetty90@gmail.com>
1 parent b29d026 commit 7d31156

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,15 @@ docker run --net=host --rm -it registry.cloud.qdrant.io/library/qdrant-migration
172172
173173
| Flag | Description |
174174
| -------------------------- | ------------------------------------------------------- |
175-
| `--milvus.url` | Source Milvus URL (e.g. `https://your-milvus-hostname`) |
176-
| `--milvus.collection` | Source collection name |
177-
| `--milvus.api-key` | Source API key (`$SOURCE_API_KEY`) |
178-
| `--milvus.enable-tls-auth` | Enable TLS Auth |
175+
| `--milvus.url` | Milvus URL (e.g. `https://your-milvus-hostname`) |
176+
| `--milvus.collection` | Milvus collection name |
177+
| `--milvus.api-key` | Milvus API key for authentication |
178+
| `--milvus.enable-tls-auth` | Whether to enable TLS Auth |
179179
| `--milvus.username` | Username for Milvus |
180180
| `--milvus.password` | Password for Milvus |
181-
| `--milvus.db-name` | Milvus database name |
182-
| `--milvus.server-version` | Server version |
181+
| `--milvus.db-name` | Optional database name |
182+
| `--milvus.server-version` | Milvus server version |
183+
| `--milvus.partitions` | List of partition names |
183184
184185
#### Qdrant Options
185186

cmd/migrate_from_milvus.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ func (r *MigrateFromMilvusCmd) migrateData(ctx context.Context, sourceClient *mi
222222
}
223223

224224
result, err := sourceClient.Query(ctx, milvusclient.NewQueryOption(r.Milvus.Collection).
225+
WithPartitions(r.Milvus.Partitions...).
225226
WithFilter(filter).
226227
WithOutputFields("*").
227228
WithLimit(batchSize))

pkg/commons/config.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ type MigrationConfig struct {
1515
}
1616

1717
type MilvusConfig struct {
18-
Url string `help:"Source Milvus URL, e.g. https://your-milvus-hostname" required:"true"`
19-
Collection string `help:"Source collection" required:"true"`
20-
APIKey string `help:"Source API key"`
21-
EnableTLSAuth bool `help:"Enable TLS Auth for Milvus" default:"false"`
22-
Username string `help:"Milvus username"`
23-
Password string `help:"Milvus password"`
24-
DBName string `help:"Milvus database name"`
25-
ServerVersion string `help:"Milvus server version"`
18+
Url string `help:"Source Milvus URL, e.g. https://your-milvus-hostname" required:"true"`
19+
Collection string `help:"Source collection" required:"true"`
20+
APIKey string `help:"Source API key"`
21+
EnableTLSAuth bool `help:"Enable TLS Auth for Milvus" default:"false"`
22+
Username string `help:"Milvus username"`
23+
Password string `help:"Milvus password"`
24+
DBName string `help:"Milvus database name"`
25+
ServerVersion string `help:"Milvus server version"`
26+
Partitions []string `help:"Milvus partition names"`
2627
}
2728

2829
type PineconeConfig struct {

0 commit comments

Comments
 (0)