绊脚石乃是进身之阶。

elasticsearch 检索问题

Elasticsearch | 作者 gangajun | 发布于2017年04月12日 | 阅读数:3314

对于一个索引记录,例如:{
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests": [ "sports", "music" ]
}我想实现将所有字段的值混在一起检索,也就是说当我输入查询为 love sport时,也能检索到这条记录,而不是一定要指定 about字段含有love 才能检索到这个记录 ,想实现对整个索引记录进行模糊检索,应该怎么做?
已邀请:

kepmoving - 90后

赞同来自:

es里面有个_all字段,mapping里面开启,搜索这个字段就可以了

要回复问题请先登录注册