你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
kennywu76 - Wood
赞同来自: jnuc093
jnuc093
赞同来自:
GET tmxpmstreeinfo/unit/_search { "query": { "match_phrase": { "name": "二次设备" } } } { "took": 0, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 9, "max_score": 6.6338444, "hits": [ { "_index": "tmxpmstreeinfo", "_type": "unit", "_id": "2814", "_score": 6.6338444, "_source": { "id": "4028810b41dfba8f0141e0430f72002a", "name": "二次设备", "pid": "0" } }, { "_index": "tmxpmstreeinfo", "_type": "unit", "_id": "4497", "_score": 6.6338444, "_source": { "id": "2c905ee4567706f5015678a5e709000b", "name": "二次设备", "pid": "2c905ee4567706f5015678a5008e000a" } }, { "_index": "tmxpmstreeinfo", "_type": "unit", "_id": "3358", "_score": 6.609888, "_source": { "id": "2c905eb3593dba8a01593df701a2000b", "name": "二次设备", "pid": "0" } },
GET tmxpmstreeinfo/unit/_search { "query": { "match_phrase": { "name": "二次" } } } { "took": 0, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 0, "max_score": null, "hits": [] } }
id:1023a08144ba8ac10144baa1de1b0003 name:配电分段线路柱上设备节点 pid:1023a08144ba8ac10144ba9f25b10002 _id:0 _type:unit _index:tmxpmstreeinfo _score:1 id:111081sbqshlsbqs01419b13964b0015 name:低压电缆段 pid:111081sbqshlsbqs01419b0a6b61000a _id:14 _type:unit _index:tmxpmstreeinfo _score:1 id:2c902aee4814f6820148167b4ddc0008 name:运行单位 pid:0 _id:19 _type:unit _index:tmxpmstreeinfo _score:1 id:101681bx5xf1155fx15xf129x915xxx6 name:直流充电装置分组 pid:101681bx5xf1155fx15xf127xc3fxxx3 _id:22 _type:unit _index:tmxpmstreeinfo _score:1
GET tmxpmstreeinfo/_mapping/unit/ { "tmxpmstreeinfo": { "mappings": { "unit": { "properties": { "id": { "type": "keyword" }, "name": { "type": "keyword" }, "pid": { "type": "keyword" } } } } } }
要回复问题请先登录或注册
6 个回复
kennywu76 - Wood
赞同来自: jnuc093
最优的方案应该是将name设置为text类型,并且增加中文分词器,如ik,这样对于“二次设备”这样的文本可以做分词,可以做全文检索。
jnuc093
赞同来自:
想要模糊查询
jnuc093
赞同来自:
kennywu76 - Wood
赞同来自:
jnuc093
赞同来自:
jnuc093
赞同来自: