Elasticsearch数据搜索与索引结构扩展
1. 数据搜索
在数据搜索方面,我们可以使用新的字段进行排序。例如,使用 title.sort 字段,将其设置为不分析,这样索引中该字段就只有一个值。在Elasticsearch的响应中,每个文档都包含用于排序的值的信息,示例如下:
{
"_index": "library",
"_type": "book",
"_id": "1",
"_score": null,
"_source": {
"title": "All Quiet on the Western Front",
"otitle": "Im Westen nichts Neues",
"author": "Erich Maria Remarque",
"year": 1929,
"characters": [
"Paul Bäumer",
"Albert Kropp",
"Haie Westhus",
"Fredrich Müller",
"Stanislaus Katczinsky",
"Tjaden"
],
"tags": [
"novel"
],
"copies": 1,
"available": true,
"sec
超级会员免费看
订阅专栏 解锁全文

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



