SOLR Introduction
From the official website http://lucene.apache.org/solr/Explanation:
SOLR is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced queryi NG, automated failover and recovery, centralized configuration and more. SOLR powers the search and navigation features of many of the world ' s largest Internet sites.
SOLR is highly available, scalable, and fault tolerant, providing distributed indexing, replication and load-balancing queries, automatic failover and recovery, centralized configuration, and more. SOLR offers the search and navigation capabilities of many of the world's largest Internet sites
The popular saying:
Solr是一个企业级搜索应用服务器,对外提供webservice接口,同时提供了多种语言支持的客户端。使用solr时,先把数据设置到solr服务器,然后可以通过各种复合查询进行快速、高效的查询。如果数据有改动,solr也提供了对应的api去更新相关数据
Windows installation SOLR
- Http://lucene.apache.org/solr/downloads.html
such as 6.3.0, after decompression:
Enter Solr's Bin directory with cmd and use the command SOLR start (for more convenience, you can configure SOLR's environment variables, which can then be named directly in CMD with SOLR)
See this interface, stating that the SOLR service started successfully, the port number is 8983, Access http://localhost:8983, will automatically jump to http://localhost:8983/solr/#/
SOLR information, Lucene information, Java information, and some basic SOLR configuration information are displayed here.
SOLR directive
Input Solr-h View SOLR instructions
Configure SOLR
Configuring Core Cores
SOLR create-c mycore-d baisc_configs:-c parameter specifies the core name of the definition, the-d parameter specifies the configuration directory (Baisc_configs is \solr-6.3.0\server\solr\configsets\ Basic_configs the corresponding directory)
After executing the command, a corresponding core directory appears under the \SOLR-6.3.0\SERVER\SOLR directory.
Refresh SOLR Admin page: http://localhost:8983/, view core, one more test
In the \solr-6.3.0\server\solr\test directory, there are conf and data directories, respectively, corresponding to the configuration and information.
Adding data to the core
The fields in SOLR must be defined first, open directory: \solr-6.3.0\server\solr\test\conf, add a field:
<field name= "Name" type= "string" indexed= "false" stored= "true" required= "true" multivalued= "false"/>
Then restart SOLR:SOLR restart-p 8983
To the SOLR admin page, select Core-test-document and fill in the data in document (s):
{"id": "1", "name": "BMW"}
Click Submit to return to Status:success, which represents the success of adding data.
To add a few more, click Query to search for data:
Query the interface of Q, representing the query criteria, such as input: Name: "BMW", execute the query again
SOLR window Environment installation Configuration and Administration page basic usage