SOLR Getting Started-SOLR Service installation (Windows system)

Source: Internet
Author: User

Installing SOLR

First, ensure that Java is installed correctly

Download SOLR, current latest version 6.1.0

All versions of SOLR

SOLR requires Java1.8 from 6.0 so if you use Solr6.0 and above, make sure the Java version is above 1.8

After the download of SOLR in a directory of the computer, I extracted to the D-Packing directory

Start SOLR

Start Solr (version windws, below windows)

Go to SOLR's unzip directory

CD Binsolr.cmd Start

SOLR started successfully!

The Administrative console address is

http://localhost:8983/solr/

Remind no cores available the first time you use it

What is core

Let's take a look at the official note.

In SOLR, the term was used to refer to a single index and associated transaction log and configuration files core < br> (including the and Schema files, among others). Your SOLR installation can has multiple solrconfig.xml 
cores if needed, which allows you to index data with diff Erent structures in the same server, and maintain more 
control over how your data are presented to different Audie NCEs. In Solrcloud mode you'll be more familiar with ,
Behind The scenes A collection consists of one or more cores. th E term collection.

Cores can created using script or as part of Solrcloud collection creation using the APIs. C BIN/SOLR Ore-spe
Cific properties (such as the directories to use for the indexes or configuration files, the core name, and other
Options) is defined in a core.properties file. Any core.properties file in any directory of your SOLR
Installation (or in a directory under where solr_home is defined) would be found by SOLR and the defined properties
'll is used for the core named in the file.

The main meaning is which allows you to index data with different structures in the same server
Allows the user to index data in a different structure.

can use

BIN/SOLR create-c <name>

To create the core

Running Sample Data

Here we use the official given example.

Just stop SOLR.
Disable SOLR You must specify a port number, or you can use-all to stop all SOLR services

Solr.cmd Stop-all

Use the sample core to start SOLR (no special instructions are located in the directory for SOLR decompression path \ Bin)

Solr.cmd-e techproducts

Let's take a look at the above command. What does SOLR do?


    1. Create directory under example create TECHPRODUCTS\SOLR directory
    2. Start SOLR using-S to specify the Solr.home
    3. Create a core
    4. Index
    5. Uploading files
      and other operations

Where the start command uses-s we look at the meaning of-s

Sets the Solr.solr.home system
Property SOLR would create core
Directories under this directory. This
Allows you to run multiple SOLR instances
On the same host while reusing the
Same server directory set using the-d
Parameter. If set, the specified directory
Should contain a solr.xml file, unless
Solr.xml exists in ZooKeeper. The
Default value is. Server/solr
This parameter was ignored when running
Examples (-e), as the Solr.solr.home
Depends on which example is run.

Let's take a look at the original SOLR under Example directory

Example directory after execution

Techproducts below are logs and SOLR directories

Execute the Post command to submit a file

Go back to the console.

Enter HERE

http://localhost:8983/solr/#/

We can see the created techproducts in the core admin.

SOLR is built to find documents that match queries. SOLR ' s schema provides a idea of what content is structured
(more in the schema), but without documents there are nothing to find. SOLR needs input before it can do later
Much.

SOLR is used to find the document that matches the keyword. SOLR's schema determines the structure of the content, and without documentation, it is impossible to query.

The e-Start command we used earlier has submitted the sample document.

Next we will query (still in the official example, query video)

Http://localhost:8983/solr/techproducts/select?q=video

The results are as follows

There are many more detailed queries that can be found in the official documentation

Quick Previews

Simple description of how SOLR is integrated into the application

In the scenario above, SOLR runs along side and other server applications. For example, an online store application
Would provide a user interface, a shopping cart, and a-to-do purchases for end users; While an inventory
Management application would allow store employees to edit product information. The product metadata would
Be kept in some kind of the database, as well as in SOLR.

SOLR uses the following steps

    1. The definition Schema,schema tells the SOLR document how to be indexed, in the online store example, the schema can be used to define the product name, description, price, manufacturer and other fields.
    2. Deploy SOLR
    3. Provide the SOLR documentation to use to retrieve
    4. Exposing the search interface in the app
Further

You already has some idea of SOLR ' s schema. This section describes SOLR's home directory and other
Configuration options.
When SOLR runs on an application server, it needs access to a home directory. The home directory contains
Important configuration information and is the place where SOLR would store its index. The layout of the home
Directory would look a little different if you were running SOLR in standalone mode vs. if you were running in
Solrcloud mode.
The crucial parts of the SOLR home directory is shown in these examples:

SOLR's Home directory

When SOLR is running on an application server, it needs to access the home directory, which contains important configuration information and is where SOLR stores the index. The structure of the home directory is as follows



The most important documents are as follows
Solr.xml
Specifying configurations for SOLR instances
Core.properties
Define the configuration of each core, such as the name, location of the Core,schema, and other parameters

Turn http://blog.csdn.net/frankcheng5143/article/details/52291176

SOLR Getting Started-SOLR Service installation (Windows system)

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.