#简介
apache全文搜索引擎
#getting started
https://lucene.apache.org/solr/guide/7_1/solr-tutorial.html
#下载
http://lucene.apache.org/solr/downloads.html
#解压
unzip -q solr-7.1.0.zip
#运行cloud示例
./bin/solr start -e cloud
#配置home目录
vi /etc/profile
export $APACHE_SOLR_HOME=/opt/solr-5.5.5
#==========================cdh solr4.10配置core =====================================================
#参考
http://blog.csdn.net/kissmelove01/article/details/45043955
1.生产实体配置文件
solrctl instancedir --generate nutch
2.创建 collection1 实例并将配置文件上传到 zookeeper
solrctl instancedir --create nutchtest nutch
#修改
solrctl instancedir --update nutchtest nutch
3.查看上传的实体
solrctl instancedir --list
4.上传到 zookeeper 之后,其他节点就可以从上面下载配置文件。接下来创建 collection
#其中-s表示设置Shard数为2,-r表示设置的replica数为2。
solrctl collection --create nutchtest -s 1 -r 1
#删除
solrctl collection --delete nutchtest
#增加share
solrctl --solr http://<target_solr_server>:8983/solr core --create <core_name> \
-p dataDir=hdfs://<nameservice>/<index_hdfs_path> -p collection.configName=<config_name> \
-p collection=<collection_name> -p numShards=<int> -p shard=<shard_id>
5.启动服务并访问
bin/solr start
http://100.100.100.242:8983
#=========================solr5.5配置core=====================================================
#create resources for a new nutch solr core
cp -r ${APACHE_SOLR_HOME}/server/solr/configsets/basic_configs ${APACHE_SOLR_HOME}/server/solr/configsets/nutch
#copy the nutch schema.xml into the conf directory
cp ${NUTCH_RUNTIME_HOME}/conf/schema.xml ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf
#make sure that there is no managed-schema "in the way":
rm ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/managed-schema
#start the solr server
${APACHE_SOLR_HOME}/bin/solr start
#create the nutch core
${APACHE_SOLR_HOME}/bin/solr create -c nutch -d ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/
#vi schema.xml 删除 enablePositionIncrements=true
vi ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/schema.xml
/enablePositionIncrements
n
i
del
#add the core name to the Solr server URL:
-Dsolr.server.url=http://localhost:8983/solr/nutch
#start
${APACHE_SOLR_HOME}/bin/solr start
#删除所有数据
documents目录下 xml模式 documents内容
<delete><query>*:*</query></delete><commit/>
apache全文搜索引擎
#getting started
https://lucene.apache.org/solr/guide/7_1/solr-tutorial.html
#下载
http://lucene.apache.org/solr/downloads.html
#解压
unzip -q solr-7.1.0.zip
#运行cloud示例
./bin/solr start -e cloud
#配置home目录
vi /etc/profile
export $APACHE_SOLR_HOME=/opt/solr-5.5.5
#==========================cdh solr4.10配置core =====================================================
#参考
http://blog.csdn.net/kissmelove01/article/details/45043955
1.生产实体配置文件
solrctl instancedir --generate nutch
2.创建 collection1 实例并将配置文件上传到 zookeeper
solrctl instancedir --create nutchtest nutch
#修改
solrctl instancedir --update nutchtest nutch
3.查看上传的实体
solrctl instancedir --list
4.上传到 zookeeper 之后,其他节点就可以从上面下载配置文件。接下来创建 collection
#其中-s表示设置Shard数为2,-r表示设置的replica数为2。
solrctl collection --create nutchtest -s 1 -r 1
#删除
solrctl collection --delete nutchtest
#增加share
solrctl --solr http://<target_solr_server>:8983/solr core --create <core_name> \
-p dataDir=hdfs://<nameservice>/<index_hdfs_path> -p collection.configName=<config_name> \
-p collection=<collection_name> -p numShards=<int> -p shard=<shard_id>
5.启动服务并访问
bin/solr start
http://100.100.100.242:8983
#=========================solr5.5配置core=====================================================
#create resources for a new nutch solr core
cp -r ${APACHE_SOLR_HOME}/server/solr/configsets/basic_configs ${APACHE_SOLR_HOME}/server/solr/configsets/nutch
#copy the nutch schema.xml into the conf directory
cp ${NUTCH_RUNTIME_HOME}/conf/schema.xml ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf
#make sure that there is no managed-schema "in the way":
rm ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/managed-schema
#start the solr server
${APACHE_SOLR_HOME}/bin/solr start
#create the nutch core
${APACHE_SOLR_HOME}/bin/solr create -c nutch -d ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/
#vi schema.xml 删除 enablePositionIncrements=true
vi ${APACHE_SOLR_HOME}/server/solr/configsets/nutch/conf/schema.xml
/enablePositionIncrements
n
i
del
#add the core name to the Solr server URL:
-Dsolr.server.url=http://localhost:8983/solr/nutch
#start
${APACHE_SOLR_HOME}/bin/solr start
#删除所有数据
documents目录下 xml模式 documents内容
<delete><query>*:*</query></delete><commit/>