POST _bulk
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"双榆树-张三","massage":"今天天气不错啊,出去转转去","uid":2,"age":20,"city":"北京","province":"北京","country":"中国","address":"中国北京市海淀区","location":{"lat":39.970718,"lon":116.325747}}
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"老城区-老刘","massage":"出发,下一站云南","uid":3,"age":30,"city":"北京","province":"北京","country":"中国","address":"中国北京市老城区台基厂33号","location":{"lat":39.904313,"lon":116.412754}}
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"东城区-李四","massage":"happy birthday!","uid":4,"age":30,"city":"北京","province":"北京","country":"中国","address":"中国北京市东城区","location":{"lat":39.893801,"lon":116.408986}}
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"朝阳区-老贾","massage":"你有没有在在想我","uid":5,"age":35,"city":"北京","province":"北京","country":"中国","address":"中国北京市朝阳区建国门","location":{"lat":39.718256,"lon":116.367910}}
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"朝阳区-老王","massage":"祝你生日快乐 Miss you","uid":6,"age":50,"city":"北京","province":"北京","country":"中国","address":"中国北京市朝阳区国贸","location":{"lat":39.918256,"lon":116.467910}}
{"index":{"_index":"twitter", "_type" : "_doc"}}
{"user":"虹桥-老吴","massage":"什么狗屁生日 我就没有过过","uid":7,"age":99,"city":"上海","province":"上海","country":"中国","address":"中国上海市闵行区","location":{"lat":31.175927,"lon":121.383328}}
GET twitter/_search
{ "query": {"multi_match": {"type": "phrase_prefix", "query": "中国北","analyzer": "ik_smart"}},"highlight": {"post_tags": ["<em>"],"pre_tags": ["</em>"],"fields": {"address": {}}
},"sort": [{"age": {"order": "desc"}}]}
展开
作者回复: 你的ik分词器哪里下载的?有自己做定制化么?