Class: Milvus::Aliases
Constant Summary collapse
- PATH =
"aliases"
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#alter(alias_name:, collection_name:) ⇒ Hash
Reassigns the alias of one collection to another.
-
#create(alias_name:, collection_name:) ⇒ Hash
This operation creates an alias for an existing collection.
-
#describe(alias_name:) ⇒ Hash
Describes the details of a specific alias.
-
#drop(alias_name:) ⇒ Hash
This operation drops a specified alias.
-
#list ⇒ Hash
Lists available roles on the server.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Milvus::Base
Instance Method Details
#alter(alias_name:, collection_name:) ⇒ Hash
Reassigns the alias of one collection to another
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/milvus/aliases.rb', line 37 def alter(alias_name:, collection_name:) response = client.connection.post("#{PATH}/alter") do |req| req.body = { aliasName: alias_name, collectionName: collection_name } end response.body end |
#create(alias_name:, collection_name:) ⇒ Hash
This operation creates an alias for an existing collection. A collection can have multiple aliases, while an alias can be associated with only one collection.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/milvus/aliases.rb', line 67 def create(alias_name:, collection_name:) response = client.connection.post("#{PATH}/create") do |req| req.body = { aliasName: alias_name, collectionName: collection_name } end response.body end |
#describe(alias_name:) ⇒ Hash
Describes the details of a specific alias
22 23 24 25 26 27 28 29 30 |
# File 'lib/milvus/aliases.rb', line 22 def describe(alias_name:) response = client.connection.post("#{PATH}/describe") do |req| req.body = { aliasName: alias_name } end response.body end |
#drop(alias_name:) ⇒ Hash
This operation drops a specified alias
52 53 54 55 56 57 58 59 60 |
# File 'lib/milvus/aliases.rb', line 52 def drop(alias_name:) response = client.connection.post("#{PATH}/drop") do |req| req.body = { aliasName: alias_name } end response.body end |
#list ⇒ Hash
Lists available roles on the server
10 11 12 13 14 15 16 |
# File 'lib/milvus/aliases.rb', line 10 def list response = client.connection.post("#{PATH}/list") do |req| req.body = {} end response.body end |