Objective
After one months of contact with SOLR, I want to take advantage of the learning SOLR by the way to pick up Java. I use 4 respectively. Versions x and 5.X have built their own in a Windows environment in a jetty way, tomcat deployment. There are changes from 4.x to 5.x and 6.x. Set up SOLR after I use the method of invoking HTTP interface, solrnet implementation of the index to delete and change, in the use of solrnet development, found that the query also reported error, do not know is not because SOLR version is too high. In the process of learning SOLR, refer to a few master's blog, from the platform, create indexes, search index data, Chinese word breakers have learned some, the latter will be sorted out. I will post the link at the end of the article.
SOLR Construction work
1. Download the SOLR Windows installation package. Here I use 5.5.1. Unzip when the download is complete. In the 5.X release, example contains several introductory unstructured files: CSV, JSON, XML. Can be imported through the Post.jar command to get started. The server is used to deploy the
2, install TOMCAT8. Copy the WebApp directory under the Solr-5.5.1/server/solr-webapp folder to the Tomcat/webapps folder and rename the WebApp directory named Solr.
3. Copy the jar package from the Solr-5.5.1/server/lib/ext to the Tomcat/webapps/solr/web-inf/lib directory.
4. Create a new Solr_home folder in any drive letter (I created in the D drive). Copy the SOLR-5.5.1/SERVER/SOLR directory to the Solr_home. This is the directory that you need to use to create the index instance core later. Both the configuration file (Schema.xml) and the index are saved here.
5, the solr-5.5.1/server/resources under the log4j.properties copy to the tomcat/webapps/solr/web-inf/classes directory. If classes does not exist manually created.
6. Configure Web. Xml. Open the Web. XML under Tomcat/webapps/solr/web-inf. Find the following configuration content
<Env-entry> <Env-entry-name>Solr/home</Env-entry-name> <Env-entry-value>/put/your/solr/home/here</Env-entry-value> <Env-entry-type>Java.lang.String</Env-entry-type> </Env-entry>
Release the comment and modify the env-entry-value to your solr_home address. my address is D:/SOLR_HOME/SOLR.
Ok. Save. By the way, restart Tomcat. Then enter http://localhost:8080/solr/index.html in the browser. Just start my configuration after the direct input http://localhost:8080/solr enter prompt 404. 4.x deployment so it can be opened, 5.x must be entered into the index.html. The appearance of your SOLR Admin UI is done.
Create a core
5.x without the default core, you need to configure it yourself. To create the core directory in D:/SOLR_HOME/SOLR, I named Univeral and copied the Conf directory in the D:/solr_home/solr/configsets directory and created the Data folder, Conf put the configuration file, Datato be indexed. Open the admin UI to the left with core admin. Enter the name and Instancedir of the form into the univeral. Then click on "Add Core"
Try to create an index of sledgehammer
In the Admin UI, select Core selector in the lower left to find the universal instance you just created. Click the Expand Menu. Select Documents.
Note: When you click on the "Submit Document" button, you will be prompted that field title does not exist because your schema.xml is not configured. Under D:/solr_home/solr/univeral/conf, locate Managed-schema (the old version is Schema.xml), open the Configure Field field.
A status:success appears on the right to indicate that the index was created successfully.
Small trial Sledgehammer Search
Click Query in the core instance menu on the left side of the SOLR Admin UI. The default q=*:* query all. The HTTP GET interface used by SOLR queries. Include field filter, keyword query, highlight, facet (vertical shard query) All enter parameters in the Get path.
Summarize
Just started groping SOLR, there are a lot of things are not very clear, I would like to base on. NET and Java to create indexes, search interface, Chinese word segmentation this block do. The following is my study of the process of reference to the blog
http://martin3000.iteye.com/blog/1330106
Http://www.cnblogs.com/zhangweizhong/p/5044858.html
http://blog.csdn.net/qing419925094/article/category/2357449
Windows environment TOMCAT8 Configuration Solr5.5.1