当前位置:网站首页>01. Solr7.3.1 deployment and configuration of jetty under win10 platform
01. Solr7.3.1 deployment and configuration of jetty under win10 platform
2022-07-05 14:11:00 【Full stack programmer webmaster】
What is? Solr
Solr yes Apache Next top open source project , use Java Development , It is based on Lucene Full text search server for .Solr Provides a ratio Lucene Richer query language , At the same time, configurable 、 Scalable , And index 、 Search performance optimized
Solr Can run independently , Running on the Jetty、Tomcat Such as these Servlet In the container ,Solr The implementation of index is very simple , use POST Method direction Solr Server sends a description Field And its contents XML file ,Solr according to xml Document add 、 Delete 、 Update index .Solr Search only needs to be sent HTTP GET request , Then on Solr return Xml、json Analysis of query results in equal format , Organize page layout .Solr Build not available UI The function of ,Solr Provides a management interface , Query through the management interface Solr Configuration and operation of .
solr Is based on lucene Develop enterprise search server , It's actually encapsulation lucene.
Solr Is an independent enterprise search application server , It is similar to Web-service Of API Interface . The user can go through http request , Submit a file in a certain format to the search engine server , Build index ; You can also make a search request , And get the return result
Solr similar webservice, Call interface , Realize increase , modify , Delete , Query index library .
Solr And Lucene The difference between
Lucene Is an open source full-text search engine toolkit , It is not a complete full-text search engine ,Lucene Provides a complete query engine and index engine , The goal is to provide software developers with an easy-to-use toolkit , In order to facilitate the realization of full-text retrieval in the target system , Or with Lucene Build a full-text search engine based on .
Solr The goal is to build an enterprise level search engine system , It's a search engine service , Can run independently , adopt Solr Can be very fast to build enterprise search engine , adopt Solr It can also efficiently complete the search function in the station .
Solr similar webservice, Provide the interface , Call interface , Send some characteristic statements , Realize increase , Delete , modify , Inquire about .
1、solr Download and install
Download address : http://www.apache.org/dyn/closer.lua/lucene/solr/7.3.1
2 install solr
After downloading , take solr-7.3.1.zip Send it under your specific drive letter . But be careful that this directory had better not have spaces , Chinese or other special characters .
3、 start-up solr
decompression solr-7.3.1.zip after , Enter its bin Catalog : In the blanks shift+ Right mouse button , Get into Powershell window :
Then input cmd.exe
solr 7.3 Bring their own jetty, Can run independently , No need to use Tomcat start-up .
Input solr.cmd start Then knock back , You can start it solr 了 . The default port is :8983
Type in the browser localhost:8983/solr, You can see that solr It's already started
4、 Create the core core
So-called core By analogy mysql Database to understand , like mysql One by one database , A warehouse for storing specific data tables .
Remember that you cannot directly use the add core To create core
In the window just opened , Input solr.cmd create -c test_Core
At this point, enter server\solr, You can see that a test_Core Catalog
Enter this directory
After creation , Refresh the page , At the same time, in the drop-down box in the figure, you can see the Core 了 . If you can't see it , stay dos Window type solr restart -p 8983 restart solr that will do
Click on myCore You can see the following information : This information includes the word breaker , And data import , Data query and other functions
5、 start-up solr And the creation of core When it's done , This step configures the Chinese word splitter :
Add Chinese word segmentation plug-in :solr 7.3.1 Chinese word segmentation plug-in comes with , take solr-7.3.1\contrib\analysis-extras\lucene-libs\lucene-analyzers-smartcn-7.3.1.jar Copied to the solr-7.3.1\server\solr-webapp\webapp\WEB-INF\lib Directory
Paste to the target path :
Configure Chinese word segmentation , modify solr-7.3.1\server\solr\test_Core**【 This test_Core It was just created core name 】**\conf\managed-schema file , Add Chinese word segmentation
file location :
After opening this file , Search for Italian, stay Italian Add our Chinese configuration ( Copy and paste ):
<!-- Italian --> <!-- Configure Chinese word breaker --> <fieldType name="text_cn" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory"/> </analyzer> </fieldType> Configuration complete :
Use solr restart -p 8983 restart solr service
Refresh to open the management page
Test Chinese word breaker :
6 、 Configure Chinese word breaker IK-Analyzer-Solr7
Adapt to the latest version solr7, And add the function of dynamically loading dictionary table ;
No restart is required solr Load the new dictionary in the case of service .
To download solr7 Version of ik Word segmentation is , Download address :http://search.maven.org/#search%7Cga%7C1%7Ccom.github.magese
Word segmentation is GitHub Source code address :https://github.com/magese/ik-analyzer-solr7
GitHub There is a way to use the word separator
Will download okay jar Put in bags solr-7.3.1/server/solr-webapp/webapp/WEB-INF/lib Directory
And then to solr-7.3.1/server/solr/test_Core/conf Open... In the directory managed-schema file , Add the following configuration
<!-- ik Word segmentation is --> <fieldType name="text_ik" class="solr.TextField"> <analyzer type="index"> <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" useSmart="false" conf="ik.conf"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" useSmart="true" conf="ik.conf"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> take gitHub Download the original code resources In the catalog 5 Configuration files are put into solr Service jetty or tomcat Of webapp/WEB-INF/classes/ Under the table of contents ( If WEB-INF Under no classes Catalog , Then create it manually );
①IKAnalyzer.cfg.xml
②ext.dic
③stopword.dic
④ik.conf
⑤dynamicdic.txtext.dic To expand the dictionary ;
stopword.dic Dictionary for stop words ;
IKAnalyzer.cfg.xml For profile .
Each word is on a separate line
Restart again after configuration solr service
Participle test
For me, , yes , No more ( Because in stopword.dic Stop words are configured in the dictionary ).
thus .Solr Configuration complete .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/111283.html Link to the original text :https://javaforall.cn
边栏推荐
- How to call the function mode of one hand and one machine
- R language ggplot2 visual bar graph: visualize the bar graph through the two-color gradient color theme, and add label text for each bar (geom_text function)
- 蓝桥杯学习2022.7.5(上午)
- Use the word "new" to attract curious people
- Sqllab 1-6 exercise
- 微服务项目部署后,无法访问静态资源,无法访问到上传到upload中的文件,解决办法
- VC开发非MFC程序内存泄漏跟踪代码
- POI set the data format of the column (valid)
- 国富氢能冲刺科创板:拟募资20亿 应收账款3.6亿超营收
- Routing in laravel framework
猜你喜欢

让秒杀狂欢更从容:大促背后的数据库(下篇)

Anchor navigation demo

金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功
![Which Internet companies are worth going to in Shenzhen for software testers [Special Edition for software testers]](/img/c2/a5f5fe17a6bd1f6f9df828ddd224d6.png)
Which Internet companies are worth going to in Shenzhen for software testers [Special Edition for software testers]

Scenario based technology architecture process based on tidb - Theory

The IPO of Ruineng industry was terminated: the annual revenue was 447million and it was planned to raise 376million
![[machine learning notes] several methods of splitting data into training sets and test sets](/img/f6/eca239bb4b1764a1495ccd9a868ec1.jpg)
[machine learning notes] several methods of splitting data into training sets and test sets

国富氢能冲刺科创板:拟募资20亿 应收账款3.6亿超营收

In addition to the root directory, other routes of laravel + xampp are 404 solutions

Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
随机推荐
Shen Ziyu, nouveau Président de Meizu: M. Huang Zhang, fondateur de Meizu, agira comme conseiller stratégique pour les produits scientifiques et technologiques de Meizu
R language uses the polR function of mass package to build an ordered multi classification logistic regression model, and uses the coef function to obtain the log odds ratio corresponding to each vari
TDengine 社区问题双周精选 | 第三期
Selenium crawls Baidu pictures
The simplest way to open more functions without certificates
Interpretation of tiflash source code (IV) | design and implementation analysis of tiflash DDL module
金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功
瑞能实业IPO被终止:年营收4.47亿 曾拟募资3.76亿
Why do I support bat to dismantle "AI research institute"
物联网应用技术专业是属于什么类
Introduction, installation, introduction and detailed introduction to postman!
广发期货排名多少?网上办理广发期货开户安全可靠吗?
SSH免密码登录详解
故障分析 | MySQL 耗尽主机内存一例分析
锚点导航小demo
清大科越冲刺科创板:年营收2亿 拟募资7.5亿
R语言ggplot2可视化:使用ggplot2可视化散点图、使用labs参数自定义X轴的轴标签文本(customize X axis labels)
魅族新任董事长沈子瑜:创始人黄章先生将作为魅族科技产品战略顾问
R语言使用ggplot2包的geom_histogram函数可视化直方图(histogram plot)
TiCDC 6.0原理之Sorter演进