Stand-alone deployment configuration solr
1. solr-7.2.0 / server / solr-webapp webapp copied to the inside of the webapps tomcat, rename solr
2. Copy solr-7.2.1 \ under server \ lib \ jar package and the lib directory under ext gmetric4j-1.0.7.jar, to jar package at the beginning of metrics copied to tomcat \ webapps \ solr project WEB-INF \ lib under
3. Copy solr-7.2.0 \ solr file in the server folder to the other non-Chinese directory, rename solrhome, I build to the next / data / soft
4. Modify /data/soft/tomcat/webapps/solr/WEB-INF\web.xml, find the following code, the blue portion, / put / your / solr / home / here to your path of solrhome, I was / data / soft / solrhome path.
vim /data/soft/tomcat/webapps/solr/WEB-INF/web.xml, remove the comments, and written into solrhome directory location:
As shown below:
5 .. copy solr7.2.1 \ server \ log4j.properties under the resources to / data / soft / tomcat / webapps / solr / WEB-INF \ classes, if no classes under WEB-INF file then create a classes folder
6. Start tomcat, access requires the full path, I was http://192.168.241.131:8080/solr/index.html#/
Look at the log, if the log has the following styles will be successful.
curl in the machine and found 403, it is estimated that page, too, as shown below.
7. Note: If the 403 error occurs map, photo editing web.xml screenshot position, find the following code, which you can comment.
Add comments below:
Refresh your browser again, the page will appear the following figure.
Solr configuration of the core (core)
1. Click Core Admin, and then click Add Core this problem occurs after the end point, but it will automatically create a new-core directory.
2.报错,提示缺少配置文件:Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/data/soft/solrhome/new_core'
Solution: conf file copy server / solr / configsets / _default / folder to the solrhome / new_core folder
3. Click on Add Core, The Add success .
4, the configuration analyzer Chinese
1. Copy dist folder in the solr-dataimporthandler-7.2.0.jar
2. Copy lucene-libs folder in the Chinese analyzer jar package
As shown below:
4. Custom Search Business Domain
As shown below:
5. Restart tomcat, you can find custom fields have emerged
6. Test segmentation effect
Reprinted from https://blog.51cto.com/12889016/2103167