Cloudera Search Solr初探

本文介绍了Cloudera Search中的Solr使用流程,包括创建Collection、修改Collection、增加Shard、新增Replica和处理Shard扩容。通过示例展示了如何在CDH5.3.2中操作SolrCloud,提供了Solr命令行工具solrctl的用法。
摘要由CSDN通过智能技术生成

说明

Solr在CDH5.3.2中主要用于Cloudera Search整体的解决方案,本文暂只描述Solr在CDH5.3.2中的一般使用情况。

关于Solr

SolrApache Lucene项目的开源企业搜索平台。其主要功能包括全文检索、命中标示分面搜索、动态聚类、数据库集成,以及富文本(如WordPDF)的处理。Solr是高度可扩展的,并提供了分布式搜索和索引复制。Solr 4还增加了NoSQL支持,以及基于Zookeeper的分布式扩展功能SolrCloud。SolrCloud的说明可以参看:SolrCloud分布式部署。在CDH5中就是采用的SolrCloud技术。

使用流程

Solr在使用过程中主要使用到了solrctl这个命令,其语法如下:

solrctl [options] command [command-arg] [command [command-arg]] ...
可选参数有:
--solr:指定 SolrCloud 的 web API,如果在 SolrCloud 集群之外的节点运行命令,就需要指定该参数。
--zk:指定 zk 集群solr目录。
--help:打印帮助信息。
--quiet:静默模式运行。
 
command 命令有:
init [--force]:初始化配置。
instancedir:维护实体目录。可选的参数有:
--generate path
--create name path
--update name path
--get name path
--delete name
--list
 
 
collection:维护 collections。可选的参数有:
--create name -s <numShards> [-c <collection.configName>] [-r <replicationFactor>] [-m <maxShardsPerNode>] [-n <createNodeSet>]]
--delete name: Deletes a collection.
--reload name: Reloads a collection.
--stat name: Outputs SolrCloud specific run-time information fora collection.
`--list: Lists all collections registered in SolrCloud.
--deletedocs name: Purges all indexed documents from a collection.
 
 
core:维护 cores。可选的参数有:
--create name [-p name=value]...]
--reload name: Reloads a core.
--unload name: Unloads a core.
--status name: Prints status of a core.
 
 
cluster:维护集群配置信息。可选的参数有:
--get-solrxml file
--put-solrxml file

创建Collection

1.生产实体配置文件:

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值