首页 > 其他 > 详细

multi-fields elasticsearch

时间:2019-03-13 12:10:32      阅读:121      评论:0      收藏:0      [点我收藏+]
It is often useful to index the same field in Elasticsearch in different ways, to serve different purposes, for example, mapping a POCO string property as a text datatype for full text search as well as mapping as a keyword datatype for structured search, sorting and aggregations. Another example is mapping a POCO string property to use different analyzers, to serve different full text search needs.

对一个field设置多种索引方式。用于不同的搜索场景。
例子:
技术分享图片

使url field设置为”text”类型用于进行全文检索,同时又给它设置”keyword”类型用于排序或聚合。

multi-fields elasticsearch

原文:https://blog.51cto.com/3922078/2362209

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!