通过Java代码(SolrJ)来实现该功能为:
SolrPing ping = new SolrPing();
ping.getParams().add("distrib", "true"); //To make it a distributed request against
a collection
rsp = ping.process(solrClient, collectionName);
int status = rsp.getStatus();
7、Plugins / Stats Screen
查看Solr状态及性能的基本信息及统计数据,如the performance of Solr's caches, the state of Solr's searchers, and the configuration of searchHandlers and requestHandlers.。
8、Query
Request-Handler (qt) /select
参数描述备注q查询,代表query input * : * 表示查询全部
name : lucl 表示查询name=lucl的
name : luc? ?表示任意字符
id=1 用:或=均可
fq过滤条件,和q查询的数据求交集 price : [0 TO 100] 0 ~ 100
price : {0 TO 100} 1 ~ 99
sort排序 id asc 表示id升序
id desc, price asc
start, rows分页起始条目,查询多少个条目数据flfield list,表示返回那些列id, namedf默认的查询字段,默认值text在solrconfig.xml文件中df属性定义了默认字段。wtwrite type,指定输出格式indent结果是否缩进,默认为false dismax
edismax
暂略hlhigh light,表示高亮 hl.fl指定需要高亮的字段;
hl.simple.pre指定高亮字段的前缀;
hl.simple.post指定高亮字段的后缀;
如查询的fl为name,前缀为,后缀为那么查询的结果会新增
"highlighting" 的分类 ,但实际的内容是通过id和
"response" 关联的。
facet类似于sql中的group byfacet.query price:[* TO 20]
price:[21 TO *]
在Raw Query Parameters中可以查询多个