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

MongoDB聚合:$listSearchIndexes

$listSearchIndexes返回指定集合现有Atlas Search索引的信息。

**重要:**该命令只能在托管的MongoDB Allas,并且要求群集层级至少为M10。

语法

db.<collection>.aggregate([{$listSearchIndexes:{id: <indexId>,name: <indexName>}}]
)

参数说明:

  • id,字符串,可选参数,要查询索引的id
  • name,字符串,可选参数,要查询索引的名称

不能同时指定idname,必须要有listSearchIndexes的权限:

访问控制

{resource: {db : <database>,collection: <collection>},actions: [ "listSearchIndexes" ]
}

内置读角色提供listSearchIndexes权限。下面的示例授予了qa数据库的read角色:

db.grantRolesToUser("<user>",[ { role: "read", db: "qa" } ]
)

输出字段

$listSearchIndexes返回一个文档数组,数组中的每个文件都包含以下字段:

字段类型描述
id字符串索引的唯一标识
name字符串索引名称
status字符串索引状态
queryable布尔索引是否已经准备好被查询
latestDefinitionVersion文档索引版本
latestDefinitionVersion.version整数索引定义的版本,当更新索引定义时,版本号会自动增加
latestDefinitionVersion.createdAt日期索引定义创建的时间
latestDefinition文档最新的索引定义
statusDetail文档数组包含了每个搜索主机(mongot)上的索引状态
statusDetail.[n].hostname字符串相应的mongot的主机名
statusDetail.[n].status字符串相应的mongot的索引状态
statusDetail.[n].queryable布尔相应的mongot的索引是否可被查询
statusDetail.[n].mainIndex文档相应的mongot的活动索引的状态
statusDetail.[n].stagedIndex文档包含了相应mongot上,在后台构建的索引的状态信息。该字段只会出现在构建一个索引去更新已存在索引的时候
synonymMappingStatus字符串索引的同义词映射状态,该字段只会出现在索引有同义词定义时。可以是BUILDINGFAILEDREADY这个三个值之一。返回的状态是每个独立mongot上同义词映射的概括
synonymMappingStatusDetail文档数组该字段(和其子字段)只有当索引有同义词定义时才会出现。包含了每个搜索主机(mongot)的索引的同义词映射状态
synonymMappingStatusDetail.[n].status字符串所有mongot进程中相应同义词映射的状态
synonymMappingStatusDetail.[n].queryable布尔表示相应的同义词映射是否支持跨所有mongot进程的查询
message字符串描述同义词映射的错误(如果适用)。只有当该同义词映射的状态为FAILED时才会出现

索引状态详情

下表描述了statusDetail.[mongot].mainIndexstatusDetail.[mongot].stagedIndex文档的内嵌字段:

这些字段描述了特定mongot的索引状态。

|字段|类型|描述|
|-|-|
|status|字符串|相应mongot上索引的生成状态|
|queryable|布尔|相应mongot上索引是否可被查询|
|synonymMappingStatus|字符串|索引生成的同义词映射在相应mongot上的状态。只有当索引定义了同义词时才会出现|
|synonymMappingStatusDetails|文档|包含索引的同义词映射在相应mongot上的状态。该字段(及其子字段)只有在索引定义了同义词时才会出现|
|definitionVersion|文档|描述生成索引时使用的索引定义版本。
|definitionVersion.version|整数|索引生成在相应mongot上使用的版本号。更新索引定义时,更新后的索引的版本号将递增|
|definitionVersion.createdAt|日期|创建索引定义的时间|
|definition|文档|建立该索引时使用的定义|

同义词映射详细信息

下表描述了以下对象的嵌入字段:

  • statusDetail.mainIndex.synonymMappingStatusDetails.<synonymMapping>
  • statusDetail.stagedIndex.synonymMappingStatusDetails<synonymMapping>

|字段|类型|描述|
|-|-|
|status|字符串|跨mongot进程的同义词映射的状态。|
|queryable|布尔|指示同义词映射是否可以支持对相应mongot进程的查询。|
|message|字符串|描述同义词映射的错误(如果适用)。只有当该同义词映射的状态为FAILED时才会出现|

Atlas Search索引状态

$listSearchIndexesstatus字段可以是下面的值:

状态描述
BUILDING当编辑后,Atlas构建或重建索引时或当Atlas Search无法跟上采集索引的变化时(会在后台重建索引),状态为BUILDING;当索引处于BUILDDING时,对于新建索引,Atlas Search不能使用索引查询直到索引构建完成;对于新建索引,Atlas Search会先试用旧索引定义,直到新索引建好后
FAILED索引构建失败,索引可能因索引定义无效而进入FAILED状态
PENDINGAtlas 尚未开始构建索引
READY索引就绪可以用于查询
STALE索引可查询,但已停止从索引集合复制数据。对该索引的搜索可能会返回过期数据。由于复制错误,索引可能会进入STALE状态

错误

7.0.3 版中的更改:此命令在非Atlas上执行时会出错:

db.names.aggregate( [{ $listSearchIndexes: { } }
] )
MongoServerError: PlanExecutor error during aggregation :: caused by :: Search index commands are only supported with Atlas.

在以前的版本中,如果在非Atlas上执行该命令,则返回空结果。

举例

返回所有查询索引

下面的示例将返回电影收藏中的所有Atlas Search索引:

db.movies.aggregate([{$listSearchIndexes: { }}]
)

输出:

[{id: '6524096020da840844a4c4a7',name: 'default',status: 'BUILDING',queryable: true,latestDefinitionVersion: {version: 2,createdAt: ISODate("2023-10-09T14:51:57.355Z")},latestDefinition: {mappings: { dynamic: true },storedSource: { include: [ 'awards.text' ] }},statusDetail: [{hostname: 'atlas-n1cm1j-shard-00-02',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }},stagedIndex: {status: 'PENDING',queryable: false,definitionVersion: {version: 1,createdAt: ISODate("2023-10-09T14:51:29.000Z")},definition: {mappings: { dynamic: true, fields: {} },storedSource: true}}},{hostname: 'atlas-n1cm1j-shard-00-01',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }},stagedIndex: {status: 'PENDING',queryable: false,definitionVersion: {version: 1,createdAt: ISODate("2023-10-09T14:51:29.000Z")},definition: {mappings: { dynamic: true, fields: {} },storedSource: true}}},{hostname: 'atlas-n1cm1j-shard-00-00',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }}}]},{id: '65240be420da840844a4d077',name: 'synonym_mappings',status: 'READY',queryable: true,latestDefinitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.305Z")},latestDefinition: {mappings: {dynamic: true,fields: {fullplot: { type: 'string' }}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}],statusDetail: [{hostname: 'atlas-n1cm1j-shard-00-02',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}},{hostname: 'atlas-n1cm1j-shard-00-01',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}},{hostname: 'atlas-n1cm1j-shard-00-00',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}}]}
]

按名称返回单个搜索索引

下面的示例将返回电影集合中名为synonym-mappings的索引:

db.movies.aggregate([{$listSearchIndexes:{name: "synonym-mappings"}}]
)

结果为:

[{id: '65240be420da840844a4d077',name: 'synonym_mappings',status: 'READY',queryable: true,latestDefinitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.305Z")},latestDefinition: {mappings: {dynamic: true,fields: {fullplot: { type: 'string' }}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}],statusDetail: [{hostname: 'atlas-n1cm1j-shard-00-02',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}},{hostname: 'atlas-n1cm1j-shard-00-01',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}},{hostname: 'atlas-n1cm1j-shard-00-00',status: 'READY',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:19:16.000Z")},definition: {mappings: {dynamic: true,fields: {fullplot: {type: 'string',indexOptions: 'offsets',store: true,norms: 'include'}}},synonyms: [{name: 'synonym_mapping',analyzer: 'lucene.english',source: { collection: 'synonyms' }}]},synonymMappingStatus: 'READY',synonymMappingStatusDetail: [{synonym_mapping: {status: 'READY',queryable: true}}]}}]}
]

按id返回单个搜索索引

下面的示例以提供的id返回搜索索引:

db.movies.aggregate([{$listSearchIndexes:{id: "6524096020da840844a4c4a7"}}]
)

结果:

[{id: '6524096020da840844a4c4a7',name: 'default',status: 'BUILDING',queryable: true,latestDefinitionVersion: {version: 2,createdAt: ISODate("2023-10-09T14:51:57.355Z")},latestDefinition: {mappings: { dynamic: true },storedSource: { include: [ 'awards.text' ] }},statusDetail: [{hostname: 'atlas-n1cm1j-shard-00-02',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }},stagedIndex: {status: 'PENDING',queryable: false,definitionVersion: {version: 1,createdAt: ISODate("2023-10-09T14:51:29.000Z")},definition: {mappings: { dynamic: true, fields: {} },storedSource: true}}},{hostname: 'atlas-n1cm1j-shard-00-01',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }},stagedIndex: {status: 'PENDING',queryable: false,definitionVersion: {version: 1,createdAt: ISODate("2023-10-09T14:51:29.000Z")},definition: {mappings: { dynamic: true, fields: {} },storedSource: true}}},{hostname: 'atlas-n1cm1j-shard-00-00',status: 'BUILDING',queryable: true,mainIndex: {status: 'READY',queryable: true,definitionVersion: {version: 0,createdAt: ISODate("2023-10-09T14:08:32.000Z")},definition: { mappings: { dynamic: true, fields: {} } }}}]}
]

相关文章:

MongoDB聚合:$listSearchIndexes

$listSearchIndexes返回指定集合现有Atlas Search索引的信息。 **重要&#xff1a;**该命令只能在托管的MongoDB Allas&#xff0c;并且要求群集层级至少为M10。 语法 db.<collection>.aggregate([{$listSearchIndexes:{id: <indexId>,name: <indexName>}…...

Excel练习:日历

Excel练习&#xff1a;日历 ‍ 题目&#xff1a;制作日历 ‍ ​​ 用rows和columns函数计算日期单元格偏移量 一个公式填充所有日期单元格 ​​ ‍...

【C语言】指针练习篇(上),深入理解指针---指针和数组练习题和sizeof,strlen的对比【图文讲解,详细解答】

欢迎来CILMY23的博客喔&#xff0c;本期系列为【C语言】指针练习篇&#xff08;上&#xff09;&#xff0c;深入理解指针---指针数组练习题和sizeof&#xff0c;strlen的对比【图文讲解,详细解答】&#xff0c;图文讲解指针和数组练习题&#xff0c;带大家更深刻理解指针的应用…...

2048游戏C++板来啦!

个人主页&#xff1a;PingdiGuo_guo 收录专栏&#xff1a;C干货专栏 大家好呀&#xff0c;我是PingdiGuo_guo&#xff0c;今天我们来学习如何用C编写一个2048小游戏。 文章目录 1.2048的规则 2.步骤实现 2.1: 初始化游戏界面 2.1.1知识点 2.1.2: 创建游戏界面 2.2: 随机…...

2000-2021年县域指标统计数据库

2000-2021年县域统计数据库 1、时间&#xff1a;2000-2021年 2、来源&#xff1a;县域统计年鉴 3、范围&#xff1a;2500县 5、指标&#xff1a; 地区名称、年份、行政区域代码、所属城市、所属省份、行政区域土地面积平方公里、乡及镇个数个、乡个数个、镇个数个、街道办…...

Hive on Spark配置

前提条件 1、安装好Hive&#xff0c;参考&#xff1a;Hive安装部署-CSDN博客 2、下载好Spark安装包&#xff0c;链接&#xff1a;https://pan.baidu.com/s/1plIBKPUAv79WJxBSbdPODw?pwd6666 3、将Spark安装包通过xftp上传到/opt/software 安装部署Spark 1、解压spark-3.3…...

计算机网络——11EMail

EMail 电子邮件&#xff08;EMail&#xff09; 3个主要组成部分 用户代理邮件服务器简单邮件传输协议&#xff1a;SMTP 用户代理 又名“邮件阅读器”撰写、编辑和阅读邮件输入和输出邮件保存在服务器上 邮件服务器 邮箱中管理和维护发送给用户的邮件输出报文队列保持待发…...

第13讲创建图文投票

创建图文投票实现 图文投票和文字投票基本一样&#xff0c;就是在投票选项里面&#xff0c;多了一个选项图片&#xff1b;、 <view class"option_item" v-for"(item,index) in options" :key"item.id"><view class"option_input&…...

Vulnhub靶机:DC3

一、介绍 运行环境&#xff1a;Virtualbox 攻击机&#xff1a;kali&#xff08;10.0.2.15&#xff09; 靶机&#xff1a;DC3&#xff08;10.0.2.56&#xff09; 目标&#xff1a;获取靶机root权限和flag 靶机下载地址&#xff1a;https://www.vulnhub.com/entry/dc-32,312…...

代码随想录算法训练营第三十一天|● 理论基础 ● 455.分发饼干 ● 376. 摆动序列 ● 53. 最大子序和

仅做学习笔记&#xff0c;详细请访问代码随想录 ● 理论基础 ● 455.分发饼干 ● 376. 摆动序列 ● 53. 最大子序和 ● 理论基础 有同学问了如何验证可不可以用贪心算法呢&#xff1f; 最好用的策略就是举反例&#xff0c;如果想不到反例&#xff0c;那么就试一试贪心吧。 …...

【光学】学习记录1-几何光学的近轴理论

课程来源&#xff1a;b站资源-光学-中科大-崔宏滨老师&#xff08;感谢&#xff09;&#xff0c;本系列仅为自学笔记 【光学 中科大 崔宏滨老师 1080p高清修复&#xff08;全集&#xff09;】https://www.bilibili.com/video/BV1NG4y1C7T9?p2&vd_source7ba37b2cff2a1b783…...

【51单片机】AT24C02(江科大、爱上半导体)

一、AT24C02 1.AT24C02介绍 AT24C02是一种可以实现掉电不丢失的存储器,可用于保存单片机运行时想要永久保存的数据信息 存储介质:E2PROM 通讯接口:12C总线 容量:256字节 2.引脚即应用电路 本开发板AT24C02原理图 12C地址全接地,即全为0 WE接地,没有写使能 SCL接P21 S…...

nohup基本使用

在Linux终端命令中经常要使用到在关闭终端界面的情况下需要后台挂起执行的进程&#xff0c;也就是关闭终端后台任务的进程还是会常驻&#xff0c;下面就简单介绍下 nohup 命令 1. nohup nohup 英文全称 no hang up&#xff08;不挂起&#xff09;&#xff0c;默认情况下&#x…...

postgresql 手动清理wal日志的101个坑

新年的第一天&#xff0c;总结下去年遇到的关于WAL日志清理的101个坑&#xff0c;以及如何相对安全地进行清理。前面是关于WAL日志堆积的原因分析&#xff0c;清理相关可以直接看第三部分。 首先说明&#xff0c;手动清理wal日志是一个高风险的操作&#xff0c;尤其对于带主从的…...

【开源训练数据集3】Top3人脸数据集及其使用方法-计算机视觉应用

目录 什么是人脸数据集? Top 3 人脸数据集 CelebFaces Attributes (CelebA)数据集 Flickr-Faces-HQ (FFHQ) 数据集 野外标记面孔 (LFW) 使用先进的人脸数据集 CelebA 访问数据集 在 Pytorch 中使用 CelebA 在 Tensorflow 中使用 CelebA Flickr-Faces-HQ 数据集 (FFH…...

精灵图,字体图标,CSS3三角

精灵图 1.1为什么需要精灵图 一个网页中往往会应用很多小的背景图像作为修饰&#xff0c;当网页中的图像过多时&#xff0c;服务器就会频繁的接受和发送请求图片&#xff0c;造成服务器请求压力过大&#xff0c;这将大大降低页面的加载速度。 因此&#xff0c;为了有效地减少…...

.NET Core性能优化技巧

.NET Core作为一个跨平台的开源框架&#xff0c;以其高效、灵活和可扩展的特性受到了广大开发者的青睐。但在实际开发中&#xff0c;如何确保应用程序的性能始终是一个关键的问题。本文将介绍十大.NET Core性能优化技巧&#xff0c;帮助开发者提升应用程序的性能。 1. 使用异步…...

人类智能远远超越了物理与数理范畴

德国哲学家黑格尔曾这样写道&#xff0c;我们越是熟悉的东西&#xff0c;就越不清楚它。这或许意味着当我们对某个事物非常熟悉时&#xff0c;可能会陷入一种思维定势&#xff0c;导致我们无法客观地认识和理解它。这种思维定势可能来自于习惯、传统观念或者个人经验&#xff0…...

数据库管理-第149期 Oracle Vector DB AI-01(20240210)

数据库管理149期 2024-02-10 数据库管理-第149期 Oracle Vector DB & AI-01&#xff08;20240210&#xff09;1 机器学习2 向量3 向量嵌入4 向量检索5 向量数据库5 专用向量数据库的问题总结 数据库管理-第149期 Oracle Vector DB & AI-01&#xff08;20240210&#xf…...

FlinkSql通用调优策略

历史文章迁移&#xff0c;稍后整理 使用DataGenerator 提前进行压测&#xff0c;了解数据的处理瓶颈、性能测试和消费能力 开启minibatch&#xff1a;"table.exec.mini-batch.enabled", "true" 开启LocalGlobal 两阶段聚合&#xff1a;"table.exec.m…...

Unity3D中Gfx.WaitForPresent优化方案

前言 在Unity中&#xff0c;Gfx.WaitForPresent占用CPU过高通常表示主线程在等待GPU完成渲染&#xff08;即CPU被阻塞&#xff09;&#xff0c;这表明存在GPU瓶颈或垂直同步/帧率设置问题。以下是系统的优化方案&#xff1a; 对惹&#xff0c;这里有一个游戏开发交流小组&…...

23-Oracle 23 ai 区块链表(Blockchain Table)

小伙伴有没有在金融强合规的领域中遇见&#xff0c;必须要保持数据不可变&#xff0c;管理员都无法修改和留痕的要求。比如医疗的电子病历中&#xff0c;影像检查检验结果不可篡改行的&#xff0c;药品追溯过程中数据只可插入无法删除的特性需求&#xff1b;登录日志、修改日志…...

《用户共鸣指数(E)驱动品牌大模型种草:如何抢占大模型搜索结果情感高地》

在注意力分散、内容高度同质化的时代&#xff0c;情感连接已成为品牌破圈的关键通道。我们在服务大量品牌客户的过程中发现&#xff0c;消费者对内容的“有感”程度&#xff0c;正日益成为影响品牌传播效率与转化率的核心变量。在生成式AI驱动的内容生成与推荐环境中&#xff0…...

如何在看板中有效管理突发紧急任务

在看板中有效管理突发紧急任务需要&#xff1a;设立专门的紧急任务通道、重新调整任务优先级、保持适度的WIP&#xff08;Work-in-Progress&#xff09;弹性、优化任务处理流程、提高团队应对突发情况的敏捷性。其中&#xff0c;设立专门的紧急任务通道尤为重要&#xff0c;这能…...

OPenCV CUDA模块图像处理-----对图像执行 均值漂移滤波(Mean Shift Filtering)函数meanShiftFiltering()

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 在 GPU 上对图像执行 均值漂移滤波&#xff08;Mean Shift Filtering&#xff09;&#xff0c;用于图像分割或平滑处理。 该函数将输入图像中的…...

【JavaSE】多线程基础学习笔记

多线程基础 -线程相关概念 程序&#xff08;Program&#xff09; 是为完成特定任务、用某种语言编写的一组指令的集合简单的说:就是我们写的代码 进程 进程是指运行中的程序&#xff0c;比如我们使用QQ&#xff0c;就启动了一个进程&#xff0c;操作系统就会为该进程分配内存…...

uniapp 字符包含的相关方法

在uniapp中&#xff0c;如果你想检查一个字符串是否包含另一个子字符串&#xff0c;你可以使用JavaScript中的includes()方法或者indexOf()方法。这两种方法都可以达到目的&#xff0c;但它们在处理方式和返回值上有所不同。 使用includes()方法 includes()方法用于判断一个字…...

Chromium 136 编译指南 Windows篇:depot_tools 配置与源码获取(二)

引言 工欲善其事&#xff0c;必先利其器。在完成了 Visual Studio 2022 和 Windows SDK 的安装后&#xff0c;我们即将接触到 Chromium 开发生态中最核心的工具——depot_tools。这个由 Google 精心打造的工具集&#xff0c;就像是连接开发者与 Chromium 庞大代码库的智能桥梁…...

深度学习之模型压缩三驾马车:模型剪枝、模型量化、知识蒸馏

一、引言 在深度学习中&#xff0c;我们训练出的神经网络往往非常庞大&#xff08;比如像 ResNet、YOLOv8、Vision Transformer&#xff09;&#xff0c;虽然精度很高&#xff0c;但“太重”了&#xff0c;运行起来很慢&#xff0c;占用内存大&#xff0c;不适合部署到手机、摄…...

用鸿蒙HarmonyOS5实现中国象棋小游戏的过程

下面是一个基于鸿蒙OS (HarmonyOS) 的中国象棋小游戏的实现代码。这个实现使用Java语言和鸿蒙的Ability框架。 1. 项目结构 /src/main/java/com/example/chinesechess/├── MainAbilitySlice.java // 主界面逻辑├── ChessView.java // 游戏视图和逻辑├──…...