Solr-5.3.0学习笔记(三)Manage Core



 

wKiom1anC-GAhR5dAATOJoUp9UM577.jpg


1、Overview

概要描述了索引库(Core)的统计分析信息(Doc数量、Segment数量、删除的Doc数量等)、实例信息(Instance路径、Data文件位置、Index文件位置等)以及复本信息等。


2、Analysis

Analysis窗口用来了解solr如何处理数据(也就是分词),处理时根据schema.xml文件中配置的field、field type以及dynamic rule等参数。

wKioL1anPPqAl5GcAAR9fgiaKbM573.jpg

说明:上述输入“Running is a Sport”应用了多种转换形式,其中is、a这类词汇被称为停用词(stop words)。停用词是指在文本中出现的频率非常高,但是对文本所携带的信息基本不产生影响的词或词语,如英文的a、an、the,或者中文的的、了、是或标点符号等。


3、Dataimport

sorry, no dataimport-handler defined!

在这里主要配置DataImportHandler (DIH)的相关参数,用来实现数据导入及导入监控等操作。

在Solr中提供了DIH的示例程序,通过bin/solr -e dih来启动。


4、Documents

提供了直接通过浏览器将数据上传到Solr索引库的功能,支持JSON、CSV、XML、Document Builder、Solr Command等多种Document Type。

说明:选中不同的Document Type会有相应的示例说明。

wKioL1andR7CycpTAAB7-ggEwXI032.jpg


wKiom1andOmRMlQKAACcGxKNzuA812.jpg


wKiom1andTOC9_qHAAEMLr-lrXE012.jpg


5、Files

提供了查看当前选定的索引库(Core)的配置文件的功能,如solrconfig.xml和schema.xml文件。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 查找schema.xml
[hadoop@nnode solr-5.3.0]$  find  . -name schema.xml
. /server/solr/configsets/basic_configs/conf/schema .xml
. /server/solr/configsets/sample_techproducts_configs/conf/schema .xml
. /example/techproducts/solr/techproducts/conf/schema .xml
. /example/example-DIH/solr/solr/conf/schema .xml
. /example/example-DIH/solr/db/conf/schema .xml
. /example/example-DIH/solr/tika/conf/schema .xml
. /example/example-DIH/solr/mail/conf/schema .xml
. /example/example-DIH/solr/rss/conf/schema .xml
[hadoop@nnode solr-5.3.0]$ 
 
# 查找solrconfig.xml
[hadoop@nnode solr-5.3.0]$  find  . -name solrconfig.xml
. /server/solr/configsets/data_driven_schema_configs/conf/solrconfig .xml
. /server/solr/configsets/basic_configs/conf/solrconfig .xml
. /server/solr/configsets/sample_techproducts_configs/conf/solrconfig .xml
. /server/solr/test_core/conf/solrconfig .xml     # 自定义的索引库test_core
. /example/techproducts/solr/techproducts/conf/solrconfig .xml
. /example/techproducts/solr/testcore/conf/solrconfig .xml
. /example/files/conf/solrconfig .xml
example目录下其他位置的略

说明:

schema.xml类似于数据表配置文件,定义了加入索引的数据的字段名称(未配置的字段名称将无法加入到索引库中)、是否被索引(indexed)或存储(stroed)等配置。

solrconfig.xml定义了Solr本身的一些配置,如数据存储目录、索引及查询的行为(/update、/select、/query等映射)等。



6、Ping

选中索引库(core name),点击ping则会通过ping命令来验证Solr server是否仍在运行。

wKioL1anftGipuEOAAJlfJSsdLU109.jpg

通过Java代码(SolrJ)来实现该功能为:

1
2
3
4
5
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.。

wKioL1aniI3w45vNAAIrjZVz41E162.jpg


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 分页
起始条目,查询多少个条目数据
fl
field list,表示返回那些列
id, name
df
默认的查询字段,默认值text在solrconfig.xml文件中df属性定义了默认字段。

wt write type,指定输出格式

indent 结果是否缩进,默认为false

dismax

edismax

暂略

hl high light,表示高亮

hl.fl指定需要高亮的字段;

hl.simple.pre指定高亮字段的前缀;

hl.simple.post指定高亮字段的后缀;


如查询的fl为name,前缀为<font color='red'>,后缀为</font>那么查询的结果会新增

"highlighting"

的分类 ,但实际的内容是通过id和

 "response"

关联的。

facet 类似于sql中的group by
facet.query  
    price:[* TO 20]
    price:[21 TO *]
在Raw Query Parameters中可以查询多个
    facet=on&facet.query=price:[* TO 20]&facet.query=price:[21 TO *]
facet.field
    根据某个字段进行分组统计
facet.prefix
    表示Facet字段值的前缀.比如”facet.field=cpu&facet.prefix=Intel”,那么对cpu字段进行Facet查询,返回的cpu都是以”Intel”开头的,”AMD”开头的cpu型号将不会被统计在内。
spatial

spellcheck


9、Replication


10、Schema Browser


11、Segments Info

文章来源:http://luchunli.blog.51cto.com/2368057/1738592

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值