亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我這里為什么會查出四條

https://img1.sycdn.imooc.com//5ae97ce30001354509760299.jpg


https://img1.sycdn.imooc.com//5ae97ce30001b3e607130300.jpg


{

? "took": 23,

? "timed_out": false,

? "_shards": {

? ? "total": 5,

? ? "successful": 5,

? ? "skipped": 0,

? ? "failed": 0

? },

? "hits": {

? ? "total": 4,

? ? "max_score": 2.7725887,

? ? "hits": [

? ? ? {

? ? ? ? "_index": "book",

? ? ? ? "_type": "novel",

? ? ? ? "_id": "1",

? ? ? ? "_score": 2.7725887,

? ? ? ? "_source": {

? ? ? ? ? "word_count": 200000,

? ? ? ? ? "author": "李四",

? ? ? ? ? "title": "三國演義",

? ? ? ? ? "publish_date": "2018-05-22"

? ? ? ? }

? ? ? },

? ? ? {

? ? ? ? "_index": "book",

? ? ? ? "_type": "novel",

? ? ? ? "_id": "2",

? ? ? ? "_score": 1.8800145,

? ? ? ? "_source": {

? ? ? ? ? "word_count": 100000,

? ? ? ? ? "author": "張三",

? ? ? ? ? "title": "三國演義",

? ? ? ? ? "publish_date": "2018-03-22"

? ? ? ? }

? ? ? },

? ? ? {

? ? ? ? "_index": "book",

? ? ? ? "_type": "novel",

? ? ? ? "_id": "4",

? ? ? ? "_score": 1.8800145,

? ? ? ? "_source": {

? ? ? ? ? "word_count": 13040,

? ? ? ? ? "author": "韓梅梅",

? ? ? ? ? "title": "三國演義",

? ? ? ? ? "publish_date": "1998-03-22"

? ? ? ? }

? ? ? },

? ? ? {

? ? ? ? "_index": "book",

? ? ? ? "_type": "novel",

? ? ? ? "_id": "9",

? ? ? ? "_score": 0.84290016,

? ? ? ? "_source": {

? ? ? ? ? "word_count": 23422340,

? ? ? ? ? "author": "董潔",

? ? ? ? ? "title": "演員的自我修養",

? ? ? ? ? "publish_date": "2012-08-22"

? ? ? ? }

? ? ? }

? ? ]

? }

}


正在回答

2 回答

因為match是模糊匹配查詢,查詢的時候不是整詞匹配的 而是匹配“三”“國”“演”“義”這四個字分開匹配,之前幾本書都叫三國演義,相當于全匹配了,演員的自我修養剛好有演字,所以也匹配上了,如果有圖書名帶三國演義中的任意一個或幾個字也是都可以匹配出來的,看下一節老師講的內容 就能明白了

0 回復 有任何疑惑可以回復我~
#1

qq_以夢為馬_1 提問者

非常感謝!
2018-05-19 回復 有任何疑惑可以回復我~

我的想法是用NGram分詞器一字一詞的進行分詞,然后用match_phrase短語查詢去查,這樣應該就能達到完全匹配

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

我這里為什么會查出四條

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號