Documentation ¶
Index ¶
- func Connect(ctx context.Context, host string, userName string, password string) (*mongo.Client, error)
- func CreateCollection(ctx context.Context, db *mongo.Database, collectionName string) (*mongo.Collection, error)
- func CreateVectorIndex(ctx context.Context, col *mongo.Collection, vectorIndexName string, ...) error
- type Index
- type VectorIndexSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(ctx context.Context, host string, userName string, password string) (*mongo.Client, error)
Connect attempts to connect to a mongo db instance.
func CreateCollection ¶
func CreateCollection(ctx context.Context, db *mongo.Database, collectionName string) (*mongo.Collection, error)
CreateCollection will create the specified collection in the specified database if it doesn't already exist.
func CreateVectorIndex ¶
func CreateVectorIndex(ctx context.Context, col *mongo.Collection, vectorIndexName string, settings VectorIndexSettings) error
CreateVectorIndex creates a very specific vector index for our example.
Types ¶
type VectorIndexSettings ¶
VectorIndexSettings represents setting to create a vector index.
Click to show internal directories.
Click to hide internal directories.