Objective
SOLR is a full-text search application for the Apache Project.
Official Document HTTP://LUCENE.APACHE.ORG/SOLR/GUIDE/6_6/
Getting Started process
1. installation---> 2. start---> 3. Create a core---> 4. Add a document---> 5.url interface query
1. installation
Download solr-6.6.0.tgz package, Unzip any directory
2. start
/opt/solr-6.6. 0/bin. /SOLR Start -force #root用户需要加force
3. Create the Core
#创建索引数据文件存放地方.
./SOLR create-c Ttt-force #ttt为核心名称, post and query are used
4. Add a document (POST)
Bin/post-c TTT example/exampledocs/*.xml #默认用的官方例子
5.url interface Query
A.curl http://Localhost:8983/solr/ttt/select?q=video#q为基本查询, Fixed value constant video is the value of the Query. Q queries are full-text queries and can be followed by regular symbols. b.http://Localhost:8983/solr/ttt/select?q=video&fl=id,name,price#fl固定值, The result returns the Id,name,price field c.http://Localhost:8983/solr/ttt/select?q=name:black#还是模糊查询, Experiment under Name:black No special meaning, is a whole string d.http://Localhost:8983/solr/ttt/select?q=price:0%20to%20400&fl=id,name,price#price:0To -Scope Query E.http://localhost:8983/solr/ttt/select?q=price:0%20to%20400&fl=id,name,price&facet=true&facet.field= Cat#facet固定值, aggregate queries, equivalent to Sql's GROUP by or countf.http://192.168.0.110:8983/solr/ttt/select?q=price:0%20to%20400&fl=id,name,price&wt=json#wt返回json格式
More tips
1. Query with the management side
2. A blogger finishing the Solr-query syntax/parameters
http://blog.csdn.net/zhufenglonglove/article/details/51518846
Introduction to SOLR for Java applications