当前位置: 首页 > 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…...

STM32+rt-thread判断是否联网

一、根据NETDEV_FLAG_INTERNET_UP位判断 static bool is_conncected(void) {struct netdev *dev RT_NULL;dev netdev_get_first_by_flags(NETDEV_FLAG_INTERNET_UP);if (dev RT_NULL){printf("wait netdev internet up...");return false;}else{printf("loc…...

Objective-C常用命名规范总结

【OC】常用命名规范总结 文章目录 【OC】常用命名规范总结1.类名&#xff08;Class Name)2.协议名&#xff08;Protocol Name)3.方法名&#xff08;Method Name)4.属性名&#xff08;Property Name&#xff09;5.局部变量/实例变量&#xff08;Local / Instance Variables&…...

VTK如何让部分单位不可见

最近遇到一个需求&#xff0c;需要让一个vtkDataSet中的部分单元不可见&#xff0c;查阅了一些资料大概有以下几种方式 1.通过颜色映射表来进行&#xff0c;是最正规的做法 vtkNew<vtkLookupTable> lut; //值为0不显示&#xff0c;主要是最后一个参数&#xff0c;透明度…...

css的定位(position)详解:相对定位 绝对定位 固定定位

在 CSS 中&#xff0c;元素的定位通过 position 属性控制&#xff0c;共有 5 种定位模式&#xff1a;static&#xff08;静态定位&#xff09;、relative&#xff08;相对定位&#xff09;、absolute&#xff08;绝对定位&#xff09;、fixed&#xff08;固定定位&#xff09;和…...

NFT模式:数字资产确权与链游经济系统构建

NFT模式&#xff1a;数字资产确权与链游经济系统构建 ——从技术架构到可持续生态的范式革命 一、确权技术革新&#xff1a;构建可信数字资产基石 1. 区块链底层架构的进化 跨链互操作协议&#xff1a;基于LayerZero协议实现以太坊、Solana等公链资产互通&#xff0c;通过零知…...

在WSL2的Ubuntu镜像中安装Docker

Docker官网链接: https://docs.docker.com/engine/install/ubuntu/ 1、运行以下命令卸载所有冲突的软件包&#xff1a; for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done2、设置Docker…...

AspectJ 在 Android 中的完整使用指南

一、环境配置&#xff08;Gradle 7.0 适配&#xff09; 1. 项目级 build.gradle // 注意&#xff1a;沪江插件已停更&#xff0c;推荐官方兼容方案 buildscript {dependencies {classpath org.aspectj:aspectjtools:1.9.9.1 // AspectJ 工具} } 2. 模块级 build.gradle plu…...

Spring AI Chat Memory 实战指南:Local 与 JDBC 存储集成

一个面向 Java 开发者的 Sring-Ai 示例工程项目&#xff0c;该项目是一个 Spring AI 快速入门的样例工程项目&#xff0c;旨在通过一些小的案例展示 Spring AI 框架的核心功能和使用方法。 项目采用模块化设计&#xff0c;每个模块都专注于特定的功能领域&#xff0c;便于学习和…...

Android写一个捕获全局异常的工具类

项目开发和实际运行过程中难免会遇到异常发生&#xff0c;系统提供了一个可以捕获全局异常的工具Uncaughtexceptionhandler&#xff0c;它是Thread的子类&#xff08;就是package java.lang;里线程的Thread&#xff09;。本文将利用它将设备信息、报错信息以及错误的发生时间都…...

规则与人性的天平——由高考迟到事件引发的思考

当那位身着校服的考生在考场关闭1分钟后狂奔而至&#xff0c;他涨红的脸上写满绝望。铁门内秒针划过的弧度&#xff0c;成为改变人生的残酷抛物线。家长声嘶力竭的哀求与考务人员机械的"这是规定"&#xff0c;构成当代中国教育最尖锐的隐喻。 一、刚性规则的必要性 …...