Getting Started with SOLR learn NOTE 1---SOLR installation starts

Source: Internet
Author: User
Tags solr

SOLR is a complete search engine solution based on Lucene developed by Apache. Lucene only provides an API interface for indexing and searching, which is equivalent to a kernel that does not provide a scheme or interface that is actually available to convert external data into Lucene indexes. SOLR provides a feature that allows users to convert external data, such as databases, Office documents, PDFs, and page files, into index files with a simple configuration, which can then be searched based on the data and the solar closed query interface.

SOLR uses HTTP to interact with external programs. That is, when the user is configured, it is published as a Web service, other programs can call the SOLR published service in the form of HTTP, issued directives such as updating indexes, querying the XXX keyword, and SOLR returns the results of the query to the caller in XML, JSON, CSV, and other formats.

SOLR publishes a service that is equivalent to a Web application that can contain several data processing modules, each with its own index data and the ability to index and search external data. Each of these modules is called a core, and for SOLR, each core is independent and non-impacting. The process of releasing the entire SOLR service is actually the process of loading each core by the Web container loading solar application +SOLR application.

The entire Web services publishing process SOLR is under control. In the case of the solr-4.7.0 version, SOLR provides a start.jar in the example directory, which, when loaded, finds the corresponding directory of the JVM parameter solr.solr.home, and if the environment variable does not exist, look for SOLR in the directory where the Start.jar is located, traversing the target Record the immediate subdirectory and locate the subdirectory containing the Core.properties file, which will be used as a core to be loaded into SOLR's web app. The directory corresponding to the environment variable solr.solr.home is called Solr_home, and in earlier versions of SOLR, the identification of the core is configured through Solr.xml in the Solr_home directory, which is not required in version 4.7.0.

The example directory in SOLR comes with a core called Collection1, which summarizes the steps to publish the core to another name (SOLR supports publishing in other containers such as Tomcat, which only summarizes the methods published using SOLR's own jetty):
1. Copy the example directory after SOLR unzip the directory and rename it to another name, such as MYSOLR;
2. Delete the useless directory under the MYSOLR directory, such as Example-dih, Exampledocs, etc., of course, it can not be deleted;
3. Enter the MYSOLR/SOLR directory and rename the Collection1 directory to another name, such as Coretest;
4. Edit the Core.properties file in the Mysolr/solr/coretest directory, which currently has only one line: Name=collection1, change collection1 to the core name you need, such as core1;
5. The command line enters the MYSOLR directory and executes Java-jar Start.jar to start the SOLR service. Of course, you can also copy the MYSOLR/SOLR directory to another directory such as C: \ And then execute Java-dsolr.solr.home=c:\solr-jar start.jar.


After the service starts successfully, the browser enters LOCALHOST:8983/SOLR to open the SOLR Administration page:

Core.properties in the core directory in addition to the name attribute, you can also configure some other properties that function as follows:
Name:core's name, required
Config:core configuration file storage path, default is Conf\solrconfig.xml
DataDir: The directory where the index and updatelog are stored, the default is data
Ulogdir: The directory where the updatelog is stored, the default is Data\tlog
Schema: Configuration file for configuring the index structure of the core, default to Conf/schema.xml
Loadonstratup: Whether the core is loaded automatically when SOLR starts
Transient: Whether the core can be automatically uninstalled when SOLR's transientcachesize reaches its setpoint

Learn SOLR just two days, above is a personal idea and summary, if not, please correct me.

Usually there is no summary of the habit, today summed up, found a lot of problems: some self-understanding of things in the description of the time only to find it is not so clear, and how to tell what they know exactly is a problem, today this thing wrote two hours ... Need to pay attention to the following summary, hope to write a blog to persist

Solr Getting Started learning Note 1---SOLR installation startup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.