課程
/云計(jì)算&大數(shù)據(jù)
/大數(shù)據(jù)
/ElasticSearch入門
瓦力老師,能不能把數(shù)據(jù)發(fā)一下。
2020-12-10
源自:ElasticSearch入門 4-5
正在回答
批量插入數(shù)據(jù)
PUT http://localhost:9200/book/novel/_bulk
{ "index":{"_id": "5"} }
{ "author": "王五", "title": "菜譜", "word_count": 5000, "publish_date": "2002-10-01"}
{ "index":{"_id": "8"} }
{ "author": "瓦力", "title": "ElasticSearch入門", "word_count": 3000, "publish_date": "2017-08-20"}
{ "index":{"_id": "9"} }
{ "author": "很胖的瓦力", "title": "ElasticSearch精通", "word_count": 3000, "publish_date": "2017-08-15"}
{ "index":{"_id": "10"} }
{ "author": "牛魔王", "title": "芭蕉扇", "word_count": 1000, "publish_date": "2000-10-01"}
{ "index":{"_id": "2"} }
{ "author": "李三", "title": "Java入門", "word_count": 2000, "publish_date": "2010-10-01"}
{ "index":{"_id": "4"} }
{ "author": "李四", "title": "ElasticSearch大法好", "word_count": 1000, "publish_date": "2017-08-01"}
{ "index":{"_id": "6"} }
{ "author": "趙六", "title": "劍譜", "word_count": 10000, "publish_date": "1997-01-01"}
{ "index":{"_id": "1"} }
{ "author": "張三", "title": "移魂大法", "word_count": 1000, "publish_date": "2000-10-01"}
{ "index":{"_id": "7"} }
{ "author": "張三豐", "title": "太極拳", "word_count": 1000, "publish_date": "1997-01-01"}
{ "index":{"_id": "3"} }
{ "author": "張四", "title": "Python入門", "word_count": 2000, "publish_date": "2005-10-01"}
{ "index":{"_id": "11"} }
{ "author": "孫悟空", "title": "七十二變", "word_count": 1000, "publish_date": "2000-10-01"}
{ "author": "瓦力", "title": "瓦力教我們學(xué)ElasticSearch", "word_count": 1000, "publish_date": "2017-08-01 00:00:00"}
舉報(bào)
ElasticSearch輕松入門,Spring Boot集成ES
2 回答@瓦力老師 可以幫我看下問題嗎
1 回答請(qǐng)問瓦力老師在插入ES 索引時(shí)...
1 回答為什么插入瓦力的時(shí)候要用PUT,插入超重瓦力的時(shí)候就要用POST了呢??
1 回答老師,這個(gè)能不能分享一下PPT嗎?
2 回答match匹配對(duì)于keyword字段查詢好像是全匹配吧,我試過text可以查詢出來,而keyword不行?是不是這樣比如用“瓦力你好”,可以查出title帶瓦力的,但是author帶瓦力卻不行,必須全匹配,我覺得是這樣,不知道對(duì)不對(duì)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2021-02-15
批量插入數(shù)據(jù)
PUT http://localhost:9200/book/novel/_bulk
{ "index":{"_id": "5"} }
{ "author": "王五", "title": "菜譜", "word_count": 5000, "publish_date": "2002-10-01"}
{ "index":{"_id": "8"} }
{ "author": "瓦力", "title": "ElasticSearch入門", "word_count": 3000, "publish_date": "2017-08-20"}
{ "index":{"_id": "9"} }
{ "author": "很胖的瓦力", "title": "ElasticSearch精通", "word_count": 3000, "publish_date": "2017-08-15"}
{ "index":{"_id": "10"} }
{ "author": "牛魔王", "title": "芭蕉扇", "word_count": 1000, "publish_date": "2000-10-01"}
{ "index":{"_id": "2"} }
{ "author": "李三", "title": "Java入門", "word_count": 2000, "publish_date": "2010-10-01"}
{ "index":{"_id": "4"} }
{ "author": "李四", "title": "ElasticSearch大法好", "word_count": 1000, "publish_date": "2017-08-01"}
{ "index":{"_id": "6"} }
{ "author": "趙六", "title": "劍譜", "word_count": 10000, "publish_date": "1997-01-01"}
{ "index":{"_id": "1"} }
{ "author": "張三", "title": "移魂大法", "word_count": 1000, "publish_date": "2000-10-01"}
{ "index":{"_id": "7"} }
{ "author": "張三豐", "title": "太極拳", "word_count": 1000, "publish_date": "1997-01-01"}
{ "index":{"_id": "3"} }
{ "author": "張四", "title": "Python入門", "word_count": 2000, "publish_date": "2005-10-01"}
{ "index":{"_id": "11"} }
{ "author": "孫悟空", "title": "七十二變", "word_count": 1000, "publish_date": "2000-10-01"}
{ "index":{"_id": "11"} }
{ "author": "瓦力", "title": "瓦力教我們學(xué)ElasticSearch", "word_count": 1000, "publish_date": "2017-08-01 00:00:00"}