elasticsearch ——id字段说明,内部是_uid
2024-08-23 01:17:28
_id
field
Each document indexed is associated with a _type
(see the section called “Mapping Typesedit”) and an_id
. The _id
field is not indexed as its value can be derived automatically from the _uid
field.
The value of the _id
field is accessible in certain queries (term
, terms
, match
, query_string
,simple_query_string
), but not in aggregations, scripts or when sorting, where the _uid
field should be used instead:
# Example documents
PUT my_index/my_type/1
{
"text": "Document with ID 1"
} PUT my_index/my_type/2&refresh=true
{
"text": "Document with ID 2"
} GET my_index/_search
{
"query": {
"terms": {
"_id": [ "1", "2" ]
}
}
}
Querying on the |
最新文章
- 深入理解MySql子查询IN的执行和优化
- Atitit smb网络邻居原理与实现查询列表
- IT菜鸟的生存指南(二)新手村任务
- 【BZOJ】 1007: [HNOI2008]水平可见直线(凸壳)
- C-指针和数组的区别
- 解决VS报表.rdl 显示乱码“小方块”问题
- jQuery模拟瀑布流布局
- Ubuntu 14.04 静态IP设置
- angular实现跨域
- Java中的系统时间
- C#获取指定的文件是否是内部特殊版本的代码
- js中this的绑定规则及优先级
- iframe标签
- zabbix入门之使用QQ邮箱接受报警信息
- Java 8- Java 分支结构 - if…else/switch
- oracle 一致读原理
- 【Leetcode】338. Bit位计数
- MySQL入门详解(二)---mysql事务、锁、以及优化
- 整理低版本ie兼容问题的解决方案
- Swift 基本数据类型与运算符表达式