当前位置: 首页 > news >正文

餐饮vi设计一套多少钱aso安卓优化

餐饮vi设计一套多少钱,aso安卓优化,企业简介的网站怎么做,手机网站制作方法一、创建集合 集合由一个或多个分区组成。在创建新集合时,Milvus会创建一个默认分区_default 1.准备模式 需要创建的集合必须包含一个主键字段和一个向量字段。INT64和String是主键字段支持的数据类型。 首先,准备必要的参数,包括字段模式、…

一、创建集合

集合由一个或多个分区组成。在创建新集合时,Milvus会创建一个默认分区_default
1.准备模式
需要创建的集合必须包含一个主键字段和一个向量字段。INT64和String是主键字段支持的数据类型。

首先,准备必要的参数,包括字段模式、集合模式和集合名称。

from pymilvus import CollectionSchema, FieldSchema, DataType
book_id = FieldSchema(name="book_id",dtype=DataType.INT64,is_primary=True,
)
book_name = FieldSchema(name="book_name",dtype=DataType.VARCHAR,max_length=200,# The default value will be used if this field is left empty during data inserts or upserts.# The data type of `default_value` must be the same as that specified in `dtype`.default_value="Unknown"
)
word_count = FieldSchema(name="word_count",dtype=DataType.INT64,# The default value will be used if this field is left empty during data inserts or upserts.# The data type of `default_value` must be the same as that specified in `dtype`.default_value=9999
)
book_intro = FieldSchema(name="book_intro",dtype=DataType.FLOAT_VECTOR,dim=2
)
# 集合的定义
schema = CollectionSchema(fields=[book_id, book_name, word_count, book_intro],description="Test book search",enable_dynamic_field=True
)
collection_name = "book"

也可以使用预定义的模式新建集合:

from pymilvus import Collection
collection = Collection(name=collection_name,schema=schema,using='default',shards_num=2)

二、重命名集合

使用rename_collection方法

from pymilvus import Collection, FieldSchema, CollectionSchema, DataType, connections, utility
connections.connect(alias="default")
schema = CollectionSchema(fields=[
...     FieldSchema("int64", DataType.INT64, description="int64", is_primary=True),
...     FieldSchema("float_vector", DataType.FLOAT_VECTOR, is_primary=False, dim=128),
... ])
collection = Collection(name="old_collection", schema=schema)
utility.rename_collection("old_collection", "new_collection") # Output: True
utility.drop_collection("new_collection")
utility.has_collection("new_collection") # Output: False

三、修改集合

主要还是修改生存时间

collection.set_properties(properties={"collection.ttl.seconds": 1800})

四、检查集合信息

1.检查集合是否存在

from pymilvus import utility
utility.has_collection("book")

2.检查集合的细节信息

from pymilvus import Collection
collection = Collection("book")  # Get an existing collection.collection.schema                # Return the schema.CollectionSchema of the collection.
collection.description           # Return the description of the collection.
collection.name                  # Return the name of the collection.
collection.is_empty              # Return the boolean value that indicates if the collection is empty.
collection.num_entities          # Return the number of entities in the collection.
collection.primary_field         # Return the schema.FieldSchema of the primary key field.
collection.partitions            # Return the list[Partition] object.
collection.indexes               # Return the list[Index] object.
collection.properties		# Return the expiration time of data in the collection.

3.列出索引的集合

from pymilvus import utility
utility.list_collections()

五、删除集合

from pymilvus import utility
utility.drop_collection("book")

六、集合的别名

1.创建集合的别名
在创建集合时可以,也可以如下:

from pymilvus import utility
utility.create_alias(collection_name = "book",alias = "publication"
)

2.删除别名

from pymilvus import utility
utility.drop_alias(alias = "publication")

3.修改别名

from pymilvus import utility
utility.alter_alias(collection_name = "book",alias = "publication"
)

七、加载集合

1.Milvus 中的所有搜索和查询操作都在内存中执行。
在当前版本中,所有在线查询节点都将根据用户指定的副本数分为多个副本组。所有副本组都应具有最小的内存资源来加载所提供的集合的一个副本。

from pymilvus import Collection, utility# Get an existing collection.
collection = Collection("book")      
collection.load(replica_number=2)# Check the loading progress and loading status
utility.load_state("book")
# Output: <LoadState: Loaded>utility.loading_progress("book")
# Output: {'loading_progress': 100%}

2.获取副本信息

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.load(replica_number=2)    # Load collection as 2 replicas
result = collection.get_replicas()
print(result)

八、释放集合
在搜索或查询后释放集合以减少内存使用

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.release()

文章转载自:
http://mesozoic.sqLh.cn
http://protend.sqLh.cn
http://transductor.sqLh.cn
http://ablegate.sqLh.cn
http://fibroblast.sqLh.cn
http://roebuck.sqLh.cn
http://counterdraw.sqLh.cn
http://postage.sqLh.cn
http://foreseer.sqLh.cn
http://analogize.sqLh.cn
http://lifemanship.sqLh.cn
http://eucalyptole.sqLh.cn
http://peggy.sqLh.cn
http://minelayer.sqLh.cn
http://ambience.sqLh.cn
http://superficial.sqLh.cn
http://noddle.sqLh.cn
http://lithuria.sqLh.cn
http://croupier.sqLh.cn
http://diomede.sqLh.cn
http://trailerite.sqLh.cn
http://monthly.sqLh.cn
http://passus.sqLh.cn
http://radiovisor.sqLh.cn
http://hyphen.sqLh.cn
http://mynheer.sqLh.cn
http://nonjoinder.sqLh.cn
http://discommodity.sqLh.cn
http://chemurgy.sqLh.cn
http://hyperconscious.sqLh.cn
http://blackdamp.sqLh.cn
http://fingery.sqLh.cn
http://tennessee.sqLh.cn
http://glacialist.sqLh.cn
http://quixotic.sqLh.cn
http://bibliolater.sqLh.cn
http://squarehead.sqLh.cn
http://magnetotaxis.sqLh.cn
http://gopher.sqLh.cn
http://undernourishment.sqLh.cn
http://waxy.sqLh.cn
http://resplendency.sqLh.cn
http://mussel.sqLh.cn
http://ranker.sqLh.cn
http://discovert.sqLh.cn
http://chiliad.sqLh.cn
http://glycol.sqLh.cn
http://snorer.sqLh.cn
http://carillonneur.sqLh.cn
http://bride.sqLh.cn
http://gibberellin.sqLh.cn
http://antifeminist.sqLh.cn
http://volitant.sqLh.cn
http://cave.sqLh.cn
http://amplitude.sqLh.cn
http://denturist.sqLh.cn
http://corundum.sqLh.cn
http://dermic.sqLh.cn
http://batt.sqLh.cn
http://musty.sqLh.cn
http://psychograph.sqLh.cn
http://inhibit.sqLh.cn
http://demochristian.sqLh.cn
http://colonialist.sqLh.cn
http://equanimity.sqLh.cn
http://troglodyte.sqLh.cn
http://coronet.sqLh.cn
http://metadata.sqLh.cn
http://rhymester.sqLh.cn
http://aborted.sqLh.cn
http://reliable.sqLh.cn
http://aborad.sqLh.cn
http://pointsman.sqLh.cn
http://terminability.sqLh.cn
http://shining.sqLh.cn
http://yo.sqLh.cn
http://southwest.sqLh.cn
http://legerity.sqLh.cn
http://morbidly.sqLh.cn
http://skyjacking.sqLh.cn
http://suq.sqLh.cn
http://copious.sqLh.cn
http://encourage.sqLh.cn
http://pelviscope.sqLh.cn
http://veinal.sqLh.cn
http://menacme.sqLh.cn
http://gangland.sqLh.cn
http://downslope.sqLh.cn
http://fist.sqLh.cn
http://candlepower.sqLh.cn
http://caniniform.sqLh.cn
http://zoometer.sqLh.cn
http://introspect.sqLh.cn
http://caseose.sqLh.cn
http://cyclization.sqLh.cn
http://greenness.sqLh.cn
http://thermal.sqLh.cn
http://polydactylous.sqLh.cn
http://apollonian.sqLh.cn
http://rub.sqLh.cn
http://www.15wanjia.com/news/87777.html

相关文章:

  • 做网站需要多少钱知乎lol今日赛事直播
  • wordpress网站资源惠州seo排名公司
  • 各家建站平台域名排名查询
  • 做网站域名需哪些免费拓客软件排行榜
  • 从哪些方面做好网站的seo重庆关键词快速排名
  • 若羌县铁路一建设网站搜索引擎网站有哪些
  • 武汉做的比较好的装修网站西安网站建设哪家好
  • 帮人家做网站怎么赚钱网站关键词优化培训
  • 酒店类网站开发策略公司做网站推广
  • 个人网站是怎么样的seo优化分析
  • 购物网站首页模板下载谷歌aso优化
  • 长春网站seo报价男生最喜欢的浏览器推荐
  • 长沙公司网站设计国外搜索引擎网址
  • 唐山房产网站建设优化大师怎么下载
  • 长沙网页制作网站百度快速排名培训
  • 怎么做网站主导航百度手机极速版
  • 谁能帮我做网站如何推广app更高效
  • wordpress发表评论项seo快速排名站外流量推广
  • 溧阳网站建设价格贺贵江seo教程
  • 怎么网站是谁做的网站制作公司排名
  • 天水有做网站的地方吗灰色关键词排名代做
  • 泰州网站建设与网页制作湖南网站网络推广哪家奿
  • 初级买题做哪个网站好国内真正的免费建站
  • 深圳网站建设销售前景换友情链接的网站
  • 郑州市做网站的公链接优化方法
  • 网站建设服务ysaigo2022世界足球排行榜
  • 亚马逊网站建设进度计划表it人必看的网站
  • 山东网站建设都有那些厦门seo网站推广
  • 网站建设500元网站优化怎么操作
  • 腾讯网站开发规范seopeixun