ES鎻掍欢瀹夎
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ES鎻掍欢瀹夎相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/sea' title='sea'>sea app col head setting 濂界殑 class search
http://blog.csdn.net/napoay/article/details/53896348 #鏇存柊 sudo yum update -y sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm sudo yum install npm sudo yum install -y git sudo yum install -y bzip2 git clone git://github.com/mobz/elasticsearch-head.git #灏嗘簮鐮佸寘涓嬭浇鍚庡壀鍒囧埌/bigdata鐩綍锛屽苟鏀规墍灞炵敤鎴峰拰缁? sudo chown -R xiaoniu:xiaoniu /bigdata/elasticsearch-head #杩涘叆鍒癳lasticsearch-head涓? cd elasticsearch-head #缂栬瘧瀹夎 npm install 鎵撳紑elasticsearch-head-master/Gruntfile.js锛屾壘鍒颁笅闈onnect灞炴€э紝鏂板hostname: 鈥?.0.0.0鈥?span style="color: #000000;">, connect: server: options: hostname: 鈥?.0.0.0鈥?span style="color: #000000;">, port: 9100, base: 鈥?鈥?span style="color: #000000;">, keepalive: true 缂栬緫elasticsearch-5.4.3/config/elasticsearch.yml,鍔犲叆浠ヤ笅鍐呭锛? http.cors.enabled: true http.cors.allow-origin: "*" #杩愯鏈嶅姟 npm run start --------------------------------------------------------------------------------------------- 瀹夎IK鍒嗚瘝鍣? 涓嬭浇瀵瑰簲鐗堟湰鐨勬彃浠? https://github.com/medcl/elasticsearch-analysis-ik/releases 棣栧厛涓嬭浇es瀵瑰簲鐗堟湰鐨刬k鍒嗚瘝鍣ㄧ殑zip鍖咃紝涓婁紶鍒癳s鏈嶅姟鍣ㄤ笂锛屽湪es鐨勫畨瑁呯洰褰曚笅鏈変竴涓猵lugins鐨勭洰褰曪紝鍦ㄨ繖涓洰褰曚笅鍒涘缓涓€涓彨ik鐨勭洰褰? 鐒跺悗灏嗚В鍘嬪ソ鐨勫唴瀹癸紝鎷疯礉鍒癷k鐩綍 灏唅k鐩綍鎷疯礉鍒板叾浠栫殑es鑺傜偣 閲嶆柊鍚姩鎵€鏈夌殑es #鍒涘缓绱㈠紩鍚嶅瓧鍙玭ews curl -XPUT http://192.168.100.211:9200/news #鍒涘缓mapping锛堢浉褰撲簬鏁版嵁涓殑schema淇℃伅锛岃〃鍚嶅拰瀛楁鍚嶄互鍙婂瓧娈电殑绫诲瀷锛? curl -XPOST http://192.168.100.211:9200/news/fulltext/_mapping -d鈥?/span> "properties": "content": "type": "text", "analyzer": "ik_max_word", "search_analyzer": "ik_max_word" 鈥? curl -XPOST http://192.168.100.211:9200/news/fulltext/1 -d鈥?/span> "content":"缇庡浗鐣欑粰浼婃媺鍏嬬殑鏄釜鐑傛憡瀛愬悧"鈥? curl -XPOST http://192.168.100.211:9200/news/fulltext/2 -d鈥?/span> "content":"鍏畨閮細鍚勫湴鏍¤溅灏嗕韩鏈€楂樿矾鏉?鈥? curl -XPOST http://192.168.100.211:9200/news/fulltext/3 -d鈥?/span> "content":"涓煩娓旇鍐茬獊璋冩煡锛氶煩璀﹀钩鍧囨瘡澶╂墸1鑹樹腑鍥芥笖鑸?鈥? curl -XPOST http://192.168.100.211:9200/news/fulltext/4 -d鈥?/span> "content":"涓浗椹绘礇鏉夌煻棰嗕簨棣嗛伃浜氳鐢峰瓙鏋嚮 瀚岀姱宸茶嚜棣?鈥? curl -XPOST http://192.168.100.211:9200/news/fulltext/_search -d鈥?/span> "query" : "match" : "content" : "涓浗" , "highlight" : "pre_tags" : ["<font color=鈥榬ed鈥?gt;", "<tag2>"], "post_tags" : ["</font>", "</tag2>"], "fields" : "content" : 鈥? ------------------------------------------------------------------- curl -XGET 鈥榟ttp://centos7-2:9200/_analyze?pretty&analyzer=ik_max_word鈥?-d 鈥樿仈鎯虫槸鍏ㄧ悆鏈€澶х殑绗旇鏈巶鍟嗏€?span style="color: #000000;"> curl -XGET 鈥榟ttp://centos7-2:9200/_analyze?pretty&analyzer=ik_smart鈥?-d 鈥樿仈鎯虫槸鍏ㄧ悆鏈€澶х殑绗旇鏈巶鍟嗏€?span style="color: #000000;"> curl -XPUT 鈥榟ttps://192.168.100.211:9200/iktest?pretty鈥?-d 鈥榹 "settings" : "analysis" : "analyzer" : "ik" : "tokenizer" : "ik_max_word" , "mappings" : "article" : "dynamic" : true, "properties" : "subject" : "type" : "string", "analyzer" : "ik_max_word" 鈥? curl -XPUT 鈥榟ttps://192.168.100.211:9200/iktest?pretty鈥?-d 鈥榹 "settings" : "analysis" : "analyzer" : "ik" : "tokenizer" : "ik_max_word" , "mappings" : "article" : "dynamic" : true, "properties" : "subject" : "type" : "string", "analyzer" : "ik_max_word" 鈥? curl -XGET 鈥榟ttp://192.168.10.16:9200/_analyze?pretty&analyzer=ik_max_word鈥?-d ‘涓崕浜烘皯鍏卞拰鍥?rsquo; --------------------------------------------------------------------------------------------- es瀹夎SQL鎻掍欢 ./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.3.0/elasticsearch-sql-5.4.3.0.zip #鐒跺悗灏嗚В鍘嬪埌plugins鐩綍涓嬬殑鍐呭鎷疯礉鍒板叾浠杄s鐨勮妭鐐圭殑plugins鐩綍 涓嬭浇SQL鐨凷erver wget https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip 鐢╪pm缂栬瘧瀹夎 unzip es-sql-site-standalone.zip cd site-server/ npm install express --save 淇敼SQL鐨凷erver鐨勭鍙? vi site_configuration.json 鍚姩鏈嶅姟 node node-server.js &
以上是关于ES鎻掍欢瀹夎的主要内容,如果未能解决你的问题,请参考以下文章
Apicloud鈥斺€擭VTabBarAnimation鎻掍欢