Elasticsearch索引结构扩展与操作指南
1. 索引映射与数据索引
在Elasticsearch中,我们可以为索引设置映射,以确保数据被正确索引。以下是一个示例映射:
{
"book": {
"properties": {
"author": {
"name": {
"type": "object",
"properties": {
"firstName": {"type": "string", "store": "yes"},
"lastName": {"type": "string", "store": "yes"}
}
}
},
"isbn": {"type": "string", "store": "yes"},
"englishTitle": {"type": "string", "store": "yes"},
"year": {"type": "integer", "store": "yes"},
"characters": {
"properties": {
"name": {"type": "string"
超级会员免费看
订阅专栏 解锁全文
5万+

被折叠的 条评论
为什么被折叠?



