In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Elasticsearch6.0 how to use the IKAnalysis participle, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. Install the plug-in
If it is in cluster mode, each node needs to install ik participle. After installing the plug-in, you need to restart the service. If a machine does not install participle before creating mapping, the index may be RED and need to be deleted and rebuilt.
. / bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.0.0/elasticsearch-analysis-ik-6.0.0.zip
two。 Create an index
You can use the CURL command, version 6.0 + can also debug API in the DevTools of the Kibana plug-in x-pack
Curl-XPUT http://localhost:9200/index
3. Create mappiing
4. Create a document
Curl-XPOST http://localhost:9200/index/fulltext/1-d' {"content": "is the United States leaving Iraq a mess?" curl-XPOST http://localhost:9200/index/fulltext/2-d'
{"content": "Ministry of Public Security: local school buses will enjoy the highest right of way"} 'curl-XPOST http://localhost:9200/index/fulltext/3-d' {"content": "investigation into the conflict between Chinese and Korean fishing police: South Korean police detain an average of one Chinese fishing boat a day." curl-XPOST http://localhost:9200/index/fulltext/4-d' {"content": "the suspect who was shot by an Asian man at the Chinese consulate in Los Angeles surrendered"}'.
5. Query document
IK supports custom configuration thesaurus, configuration files in the config folder analysis-ik/IKAnalyzer.cfg.xml, dictionary files are also in the same directory, can support multiple options configuration, ext_dict- custom thesaurus, ext_stopwords- shielded thesaurus.
At the same time, it also supports hot update configuration, configure remote_ext_dict to http address, enter a word per line, note that the document format should be UTF8 without BOM format, if the thesaurus is updated, you only need to update any field Last-Modified or ETag in response header.
IK Analyzer extension configuration custom/mydict.dic;custom/single_word_low_freq.dic custom/ext_stopword.dic location http://xxx.com/xxx.dic will it be helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.