Solr5创建Collection的多core。
来源:互联网 发布:知乎年度300问 编辑:程序博客网 时间:2024/05/21 07:09
虽然一直在用Solr,但是一直没有对他进行比较深入的了解,最近正好有时间,研究了一下,主要是一直想对solr的collection进行分表,那样的话一天的数据一个表,比较规范,也比较好用。网上搜了一下,基本上都是通过多core来实现的。这里说一下创建的url:
http://127.0.0.1:8983/solr/admin/cores?action=CREATE
&name=collection2
&instanceDir=/opt/gshen/solr/collection2
&config=/opt/gshen/solr/conf/solrconfig.xml
&schema=/opt/gshen/solr/conf/schema.xml
&dataDir=/opt/gshen/solr/collection2/data
另外还有其他的参数,如:
Parameter Description
name
stringYesN/AThe name of the new core. Same as "name" on the <core>
element.
instanceDir
stringNowhatever is specified for "name" parameterThe directory where files for this SolrCore should be stored. Same as instanceDir
on the <core>
element.
config
stringNoName of the config file (i.e., solrconfig.xml
) relative to instanceDir
.
schema
stringNoName of the schema file to use for the core. Please note that if you are using a "managed schema" (the default behavior) then any value for this property which does not match the effective managedSchemaResourceName
will be read once, backed up, and converted for managed schema use. See Schema Factory Definition in SolrConfig for details.
dataDir
stringNoName of the data directory relative to instanceDir
.
collection
stringNoThe name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<value>
causes a property of <param>=<value>
to be set if a new collection is being created. Use collection.configName=<configname>
to point to the configuration for a new collection.
shard
stringNoThe shard id this core represents. Normally you want to be auto-assigned a shard id.
property.name=valuestringNo Sets the core property name to value. See the section on defining core.properties file contents.asyncstringNo Request ID to track this action which will be processed asynchronously另外详细的参数可以参考:https://cwiki.apache.org/confluence/display/solr/CoreAdmin+APIParameter Description
name
stringYesN/AThe name of the new core. Same as "name" on the <core>
element.
instanceDir
stringNowhatever is specified for "name" parameterThe directory where files for this SolrCore should be stored. Same as instanceDir
on the <core>
element.
config
stringNoName of the config file (i.e., solrconfig.xml
) relative to instanceDir
.
schema
stringNoName of the schema file to use for the core. Please note that if you are using a "managed schema" (the default behavior) then any value for this property which does not match the effective managedSchemaResourceName
will be read once, backed up, and converted for managed schema use. See Schema Factory Definition in SolrConfig for details.
dataDir
stringNoName of the data directory relative to instanceDir
.
collection
stringNoThe name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<value>
causes a property of <param>=<value>
to be set if a new collection is being created. Use collection.configName=<configname>
to point to the configuration for a new collection.
shard
stringNoThe shard id this core represents. Normally you want to be auto-assigned a shard id.
property.name=valuestringNo Sets the core property name to value. See the section on defining core.properties file contents.asyncstringNo Request ID to track this action which will be processed asynchronously跨core查询:
http://192.168.100.175:8080/solr/collection1/select?
q=message:中国人
&wt=json
&indent=true
&shards=192.168.100.175:8080/solr/collection1,192.168.100.175:8080/solr/collection2
这里只列出了部分属性和功能,具体可到http://wiki.apache.org/solr/CoreAdmin查询使用方法。
Parameter
Description
name
stringYesN/AThe name of the new core. Same as "name" on the <core>
element.
instanceDir
stringNowhatever is specified for "name" parameterThe directory where files for this SolrCore should be stored. Same as instanceDir
on the <core>
element.
config
stringNoName of the config file (i.e., solrconfig.xml
) relative to instanceDir
.
schema
stringNoName of the schema file to use for the core. Please note that if you are using a "managed schema" (the default behavior) then any value for this property which does not match the effective managedSchemaResourceName
will be read once, backed up, and converted for managed schema use. See Schema Factory Definition in SolrConfig for details.
dataDir
stringNoName of the data directory relative to instanceDir
.
collection
stringNoThe name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<value>
causes a property of <param>=<value>
to be set if a new collection is being created. Use collection.configName=<configname>
to point to the configuration for a new collection.
shard
stringNoThe shard id this core represents. Normally you want to be auto-assigned a shard id.
property.name=valuestringNo Sets the core property name to value. See the section on defining core.properties file contents.asyncstringNo Request ID to track this action which will be processed asynchronously- Solr5创建Collection的多core。
- solr5.4 core配置
- solr5.5的搭建,以及第一个core的配置
- solr的collection,shard,replica,core概念
- solr的collection,shard,replica,core概念
- solr的collection,shard,replica,core概念
- solr5.x 搭建环境 安装core
- Solr5.1.0的搭建
- Solr5.2的配置
- solr5的基本操作
- net core区域的创建
- 创建solr集群的shard与collection
- 创建带Collection的Mybatis sql语句
- solr5.4的安装配置
- solr5.0.0的使用(二)
- solr5.0.0的使用(—)
- solr5.3的spellcheck功能
- solr5和solr4的区别
- linux内核符号表
- linux服务器历险之linux性能监控
- CSS3 基础(006_过渡)
- redis-JedisPoolConfig配置
- POJ 3274 - 数组 + 哈希
- Solr5创建Collection的多core。
- 数字签名与数字证书
- SetWindowPos讲解
- Java之IO概述
- mysql datetime vs timestamp
- Struts的优点/缺点
- 十年·杭研大咖说 | 邱似峰:从应届生到网易视频云CTO的蜕变
- 第11章 结构化数据
- 【数学】奇异值分解(SVD)原理详解及推导