Semantic_text 字段默认嵌入模型变为 .jina-embeddings-v5-text-small

在早期的 Elastic Stack 版本(9.4 之前),当我们定义 semantic_text 字段时,没有指名它的 inference endpoint,那么它的默认 inference endpoint 就是 .elser_model_2。从 Elastic Stack 9.4 之后,我们可以看到这个变化。比如:

bash 复制代码
`

1.  PUT semantic_text
2.  {
3.    "mappings": {
4.      "properties": {
5.        "content": {
6.          "type": "text",
7.          "copy_to": "inference_field"
8.        },
9.        "inference_field": {
10.          "type": "semantic_text"
11.        }
12.      }
13.    }
14.  }

`AI写代码![](https://csdnimg.cn/release/blogv2/dist/pc/img/runCode/icon-arrowwhite.png)

如上所示,我们定以了一个叫做 content 的字段,它的类型是 text。我们同时也把它拷贝到 inference_field 字段,而它的类型是 semantic_text。在上面,我们并没有标注它的 inference id。那么在默认的情况下,它的 inference id 是什么呢?

我们可以打入如下的命令:

bash 复制代码
`GET semantic_text/_mapping` AI写代码

我们可以看到在默认的情况下,它的 inference_id 是 .jina-embeddings-v5-text-small,也就是说它支持上百种语音。

我们做一个简单的例子:

css 复制代码
`

1.  PUT semantic_text/_bulk
2.  {"index": {"_id": "1"}}
3.  {"content": "阿里巴巴(中国)有限公司成立于2007年03月26日,法定代表人蒋芳"}
4.  {"index": {"_id": "2"}}
5.  {"content": "百度是拥有强大互联网基础的领先AI公司。百度愿景是:成为最懂用户,并能帮助人们成长的全球顶级高科技公司。于2000年1月1日在中关村创建了百度公司"}

`AI写代码

我们写入上面的文档,并做如下的查询:

bash 复制代码
`

1.  GET semantic_text/_search
2.  {
3.    "query": {
4.      "match": {
5.        "inference_field": "阿里是什么样的公司?"
6.      }
7.    }
8.  }

`AI写代码
bash 复制代码
`

1.  GET semantic_text/_search
2.  {
3.    "query": {
4.      "match": {
5.        "inference_field": "What is Baidu company?"
6.      }
7.    }
8.  }

`AI写代码

很显然它天生支持多语言。

有人可能想知道,这个到底是怎么做到的。答案是是它在底层自动使用了 EIS (Elastic Inference Service)。详细的连接步骤,请参考文章 "跳过 MLOps:通过 Cloud Connect 使用 EIS 为自管理 Elasticsearch 提供托管云推理"。

更多详情,请观看视频:

www.bilibili.com/video/BV1BK...

相关推荐
彧azz5 小时前
Git 入门实操实例:从安装到远程仓库全流程
大数据·笔记·git·学习·elasticsearch
醉颜凉5 小时前
Canal 与 Elasticsearch 实时同步:增量索引更新、删除处理与全量重建方案
elasticsearch·canal·数据同步·增量更新·全量重建
无风听海12 小时前
深入解析 Elasticsearch 的 match_phrase_prefix与 match_bool_prefix
大数据·elasticsearch·mybatis
天天喝旺仔13 小时前
Elasticsearch 全文检索实战:Lucene 倒排索引与 NoSQL 文档检索落地
elasticsearch·搜索引擎·全文检索·nosql·lucene
浅念-1 天前
一文吃透Git:本地操作|冲突处理|远程协作|GitFlow工作流详解
大数据·git·elasticsearch·搜索引擎·gitflow
vx-程序开发1 天前
【计算机毕设】基于Spring Boot的古城景区管理系统88564
java·数据库·spring boot·后端·spring·elasticsearch·课程设计
czhc11400756631 天前
2026-09-11 一日综合:树的父链、git 概念、三方死锁、静默失败
大数据·git·elasticsearch
Elastic 中国社区官方博客2 天前
Elasticsearch 向量数据库:几分钟内完成部署,以经济高效的方式扩展至数千亿规模
大数据·运维·数据库·elasticsearch·搜索引擎·ai·全文检索
Elasticsearch2 天前
将 Vercel 数据导入 Elastic:无需安装任何东西的无服务器可观测性
elasticsearch