Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPS = "https"

	DefaultHTTPPort  = 80
	DefaultHTTPSPort = 443
)
View Source
const PythonScript = "cmd/faiss_to_qdrant.py"
View Source
const (
	// SAMPLE_SIZE_PER_WORKER is the number of points to sample per worker to determine ranges for parallel migration.
	SAMPLE_SIZE_PER_WORKER = 10
)

Variables

This section is empty.

Functions

func Execute

func Execute(projectVersion, projectBuild string)

func NewParser added in v0.2.0

func NewParser(args []string) (*kong.Context, error)

Types

type CLI

type CLI struct {
	Globals

	Qdrant        MigrateFromQdrantCmd        `cmd:"" help:"Migrate data from a Qdrant database to Qdrant."`
	Milvus        MigrateFromMilvusCmd        `cmd:"" help:"Migrate data from a Milvus database to Qdrant."`
	Pinecone      MigrateFromPineconeCmd      `cmd:"" help:"Migrate data from a Pinecone database to Qdrant."`
	Chroma        MigrateFromChromaCmd        `cmd:"" help:"Migrate data from a Chroma database to Qdrant."`
	Weaviate      MigrateFromWeaviateCmd      `cmd:"" help:"Migrate data from a Weaviate database to Qdrant."`
	Redis         MigrateFromRedisCmd         `cmd:"" help:"Migrate data from a Redis database to Qdrant."`
	Mongodb       MigrateFromMongoDBCmd       `cmd:"" help:"Migrate data from a Mongo database to Qdrant."`
	OpenSearch    MigrateFromOpenSearchCmd    `cmd:"" name:"opensearch" help:"Migrate data from an OpenSearch database to Qdrant."`
	Elasticsearch MigrateFromElasticsearchCmd `cmd:"" help:"Migrate data from an Elasticsearch database to Qdrant."`
	Azure         MigrateFromAzureCmd         `cmd:"" help:"Migrate data from an Azure AI Search index to Qdrant."`
	PG            MigrateFromPGCmd            `cmd:"" name:"pg" help:"Migrate data from a PostgreSQL database to Qdrant."`
	S3Vectors     MigrateFromS3VectorsCmd     `cmd:"" name:"s3" help:"Migrate data from S3 Vectors to Qdrant."`
	Faiss         MigrateFromFaissCmd         `cmd:"" help:"Migrate data from a FAISS index to Qdrant."`
	Solr          MigrateFromSolrCmd          `cmd:"" help:"Migrate data from an Apache Solr collection to Qdrant."`
}

type Globals

type Globals struct {
	Debug               bool             `help:"Enable debug mode."`
	Trace               bool             `help:"Enable trace mode."`
	SkipTlsVerification bool             `help:"Skip TLS verification."`
	Version             kong.VersionFlag `name:"version" help:"Print version information and quit"`
}

type MigrateFromAzureCmd added in v0.6.7

type MigrateFromAzureCmd struct {
	Azure     commons.AzureSearchConfig `embed:"" prefix:"azure."`
	Qdrant    commons.QdrantConfig      `embed:"" prefix:"qdrant."`
	Migration commons.MigrationConfig   `embed:"" prefix:"migration."`
	IdField   string                    `prefix:"qdrant." help:"Field storing Azure AI Search document keys in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromAzureCmd) Parse added in v0.6.7

func (r *MigrateFromAzureCmd) Parse() error

func (*MigrateFromAzureCmd) Run added in v0.6.7

func (r *MigrateFromAzureCmd) Run(globals *Globals) error

func (*MigrateFromAzureCmd) Validate added in v0.6.7

func (r *MigrateFromAzureCmd) Validate() error

type MigrateFromChromaCmd added in v0.2.0

type MigrateFromChromaCmd struct {
	Chroma         commons.ChromaConfig    `embed:"" prefix:"chroma."`
	Qdrant         commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration      commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField        string                  `prefix:"qdrant." help:"Field storing Chroma IDs in Qdrant." default:"__id__"`
	DistanceMetric string                  `prefix:"qdrant." enum:"cosine,dot,euclid,manhattan" help:"Distance metric for the Qdrant collection" default:"euclid"`
	DocumentField  string                  `prefix:"qdrant." help:"Field storing Chroma documents in Qdrant." default:"document"`
	// contains filtered or unexported fields
}

func (*MigrateFromChromaCmd) Parse added in v0.2.0

func (r *MigrateFromChromaCmd) Parse() error

func (*MigrateFromChromaCmd) Run added in v0.2.0

func (r *MigrateFromChromaCmd) Run(globals *Globals) error

func (*MigrateFromChromaCmd) Validate added in v0.2.0

func (r *MigrateFromChromaCmd) Validate() error

type MigrateFromElasticsearchCmd added in v0.2.9

type MigrateFromElasticsearchCmd struct {
	Elasticsearch commons.ElasticsearchConfig `embed:"" prefix:"elasticsearch."`
	Qdrant        commons.QdrantConfig        `embed:"" prefix:"qdrant."`
	Migration     commons.MigrationConfig     `embed:"" prefix:"migration."`
	IdField       string                      `prefix:"qdrant." help:"Field storing Elasticsearch IDs in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromElasticsearchCmd) Parse added in v0.2.9

func (*MigrateFromElasticsearchCmd) Run added in v0.2.9

func (r *MigrateFromElasticsearchCmd) Run(globals *Globals) error

func (*MigrateFromElasticsearchCmd) Validate added in v0.2.9

func (r *MigrateFromElasticsearchCmd) Validate() error

type MigrateFromFaissCmd added in v0.2.8

type MigrateFromFaissCmd struct {
	FaissIndex     commons.FaissConfig     `embed:"" prefix:"faiss."`
	Qdrant         commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration      commons.MigrationConfig `embed:"" prefix:"migration."`
	DistanceMetric string                  `prefix:"qdrant." enum:"euclid,cosine,dot,manhattan" help:"Distance metric for the Qdrant collection" default:"cosine"`
	// contains filtered or unexported fields
}

func (*MigrateFromFaissCmd) Parse added in v0.2.8

func (r *MigrateFromFaissCmd) Parse() error

func (*MigrateFromFaissCmd) Run added in v0.2.8

func (r *MigrateFromFaissCmd) Run(globals *Globals) error

func (*MigrateFromFaissCmd) Validate added in v0.2.8

func (r *MigrateFromFaissCmd) Validate() error

type MigrateFromMilvusCmd added in v0.2.0

type MigrateFromMilvusCmd struct {
	Milvus         commons.MilvusConfig    `embed:"" prefix:"milvus."`
	Qdrant         commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration      commons.MigrationConfig `embed:"" prefix:"migration."`
	DistanceMetric map[string]string       `` /* 136-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MigrateFromMilvusCmd) Parse added in v0.2.0

func (r *MigrateFromMilvusCmd) Parse() error

func (*MigrateFromMilvusCmd) Run added in v0.2.0

func (r *MigrateFromMilvusCmd) Run(globals *Globals) error

func (*MigrateFromMilvusCmd) Validate added in v0.2.0

func (r *MigrateFromMilvusCmd) Validate() error

type MigrateFromMongoDBCmd added in v0.2.3

type MigrateFromMongoDBCmd struct {
	MongoDB      commons.MongoDBConfig   `embed:"" prefix:"mongodb."`
	Qdrant       commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration    commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField      string                  `prefix:"qdrant." help:"Field storing MongoDB IDs in Qdrant." default:"__id__"`
	VectorFields []string                `required:"true" prefix:"mongodb." help:"Fields to use as vector."`
	// contains filtered or unexported fields
}

func (*MigrateFromMongoDBCmd) Parse added in v0.2.3

func (r *MigrateFromMongoDBCmd) Parse() error

func (*MigrateFromMongoDBCmd) Run added in v0.2.3

func (r *MigrateFromMongoDBCmd) Run(globals *Globals) error

func (*MigrateFromMongoDBCmd) Validate added in v0.2.3

func (r *MigrateFromMongoDBCmd) Validate() error

type MigrateFromOpenSearchCmd added in v0.2.4

type MigrateFromOpenSearchCmd struct {
	OpenSearch commons.OpenSearchConfig `embed:"" prefix:"opensearch."`
	Qdrant     commons.QdrantConfig     `embed:"" prefix:"qdrant."`
	Migration  commons.MigrationConfig  `embed:"" prefix:"migration."`
	IdField    string                   `prefix:"qdrant." help:"Field storing OpenSearch IDs in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromOpenSearchCmd) Parse added in v0.2.4

func (r *MigrateFromOpenSearchCmd) Parse() error

func (*MigrateFromOpenSearchCmd) Run added in v0.2.4

func (r *MigrateFromOpenSearchCmd) Run(globals *Globals) error

func (*MigrateFromOpenSearchCmd) Validate added in v0.2.4

func (r *MigrateFromOpenSearchCmd) Validate() error

type MigrateFromPGCmd added in v0.2.5

type MigrateFromPGCmd struct {
	PG             commons.PGConfig        `embed:"" prefix:"pg."`
	Qdrant         commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration      commons.MigrationConfig `embed:"" prefix:"migration."`
	DistanceMetric map[string]string       `` /* 136-byte string literal not displayed */
	NumWorkers     int                     `help:"Number of parallel workers for data migration (0 = number of CPU cores)" default:"0" prefix:"migration."`
	// contains filtered or unexported fields
}

func (*MigrateFromPGCmd) Parse added in v0.2.5

func (r *MigrateFromPGCmd) Parse() error

func (*MigrateFromPGCmd) Run added in v0.2.5

func (r *MigrateFromPGCmd) Run(globals *Globals) error

func (*MigrateFromPGCmd) Validate added in v0.2.5

func (r *MigrateFromPGCmd) Validate() error

type MigrateFromPineconeCmd added in v0.2.0

type MigrateFromPineconeCmd struct {
	Pinecone     commons.PineconeConfig  `embed:"" prefix:"pinecone."`
	Qdrant       commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration    commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField      string                  `prefix:"qdrant." help:"Field storing Pinecone IDs in Qdrant." default:"__id__"`
	SparseVector string                  `prefix:"qdrant." help:"Name of the sparse vector in Qdrant" default:"sparse_vector"`
	// contains filtered or unexported fields
}

func (*MigrateFromPineconeCmd) Parse added in v0.2.0

func (r *MigrateFromPineconeCmd) Parse() error

func (*MigrateFromPineconeCmd) Run added in v0.2.0

func (r *MigrateFromPineconeCmd) Run(globals *Globals) error

func (*MigrateFromPineconeCmd) Validate added in v0.2.0

func (r *MigrateFromPineconeCmd) Validate() error

type MigrateFromQdrantCmd

type MigrateFromQdrantCmd struct {
	Source               commons.QdrantConfig    `embed:"" prefix:"source."`
	Target               commons.QdrantConfig    `embed:"" prefix:"target."`
	Migration            commons.MigrationConfig `embed:"" prefix:"migration."`
	MaxMessageSize       int                     `help:"Maximum gRPC message size in bytes (default: 33554432 = 32MB)" default:"33554432" prefix:"source."`
	EnsurePayloadIndexes bool                    `help:"Ensure payload indexes from the source are created on the target" default:"true" prefix:"target."`
	ShardKey             string                  `help:"Fixed keyword shard key used for every target upsert" prefix:"target."`
	ShardKeyField        string                  `help:"Payload field used as the target shard key for each point" prefix:"target."`
	NumWorkers           int                     `help:"Number of parallel workers for data migration (0 = number of CPU cores)" default:"0" prefix:"migration."`
	// contains filtered or unexported fields
}

func (*MigrateFromQdrantCmd) Parse

func (r *MigrateFromQdrantCmd) Parse() error

func (*MigrateFromQdrantCmd) Run

func (r *MigrateFromQdrantCmd) Run(globals *Globals) error

func (*MigrateFromQdrantCmd) Validate

func (r *MigrateFromQdrantCmd) Validate() error

func (*MigrateFromQdrantCmd) ValidateParsedValues added in v0.1.0

func (r *MigrateFromQdrantCmd) ValidateParsedValues() error

type MigrateFromRedisCmd added in v0.2.0

type MigrateFromRedisCmd struct {
	Redis     commons.RedisConfig     `embed:"" prefix:"redis."`
	Qdrant    commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField   string                  `prefix:"qdrant." help:"Field storing Redis IDs in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromRedisCmd) Parse added in v0.2.0

func (r *MigrateFromRedisCmd) Parse() error

func (*MigrateFromRedisCmd) Run added in v0.2.0

func (r *MigrateFromRedisCmd) Run(globals *Globals) error

func (*MigrateFromRedisCmd) Validate added in v0.2.0

func (r *MigrateFromRedisCmd) Validate() error

type MigrateFromS3VectorsCmd added in v0.2.6

type MigrateFromS3VectorsCmd struct {
	S3        commons.S3VectorsConfig `embed:"" prefix:"s3."`
	Qdrant    commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField   string                  `prefix:"qdrant." help:"Field storing S3 IDs in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromS3VectorsCmd) Parse added in v0.2.6

func (r *MigrateFromS3VectorsCmd) Parse() error

func (*MigrateFromS3VectorsCmd) Run added in v0.2.6

func (r *MigrateFromS3VectorsCmd) Run(globals *Globals) error

func (*MigrateFromS3VectorsCmd) Validate added in v0.2.6

func (r *MigrateFromS3VectorsCmd) Validate() error

type MigrateFromSolrCmd added in v0.5.2

type MigrateFromSolrCmd struct {
	Solr      commons.SolrConfig      `embed:"" prefix:"solr."`
	Qdrant    commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration commons.MigrationConfig `embed:"" prefix:"migration."`
	IdField   string                  `prefix:"qdrant." help:"Field storing Solr IDs in Qdrant." default:"__id__"`
	// contains filtered or unexported fields
}

func (*MigrateFromSolrCmd) Parse added in v0.5.2

func (r *MigrateFromSolrCmd) Parse() error

func (*MigrateFromSolrCmd) Run added in v0.5.2

func (r *MigrateFromSolrCmd) Run(globals *Globals) error

func (*MigrateFromSolrCmd) Validate added in v0.5.2

func (r *MigrateFromSolrCmd) Validate() error

type MigrateFromWeaviateCmd added in v0.2.0

type MigrateFromWeaviateCmd struct {
	Weaviate  commons.WeaviateConfig  `embed:"" prefix:"weaviate."`
	Qdrant    commons.QdrantConfig    `embed:"" prefix:"qdrant."`
	Migration commons.MigrationConfig `embed:"" prefix:"migration."`
	// contains filtered or unexported fields
}

func (*MigrateFromWeaviateCmd) Parse added in v0.2.0

func (r *MigrateFromWeaviateCmd) Parse() error

func (*MigrateFromWeaviateCmd) Run added in v0.2.0

func (r *MigrateFromWeaviateCmd) Run(globals *Globals) error

func (*MigrateFromWeaviateCmd) Validate added in v0.2.0

func (r *MigrateFromWeaviateCmd) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL