下载solr3.6之后,进行如下配置:
1.将${NUTCH_HOME}/conf/下的schema.xml拷贝到${SOLR_HOME}/example/solr/conf替换掉原来的schema.xml。
2.将${SOLR_HOME}/example/solr/conf下的solrconfig.xml进行改动,将里面的所有的
<str name="df">text</str>
替换成
<str name="df">content</str>
对于solr4.0,与上面有所不同:
1.将${NUTCH_HOME}/conf/下的schema-solr4.xml拷贝到${SOLR_HOME}/example/solr/collection1/conf替换掉原来的schema.xml。
2.对此时的schema.xml进行适当的修改,改动内容如下:
2.1 将所有的“stopwords.txt”替换成“lang/stopwords_en.txt”。
2.2 在 <fields> 内添加如下一行:
<field name="_version_" type="long" indexed="true" stored="true"/>
2.3 将fields中的segment、digest、boost、tstamp的indexed属性改为true。
3.将${SOLR_HOME}/example/solr/collection1/conf下的solrconfig.xml进行改动,将里面的所有的
对于solr4.0,与上面有所不同:
1.将${NUTCH_HOME}/conf/下的schema-solr4.xml拷贝到${SOLR_HOME}/example/solr/collection1/conf替换掉原来的schema.xml。
2.对此时的schema.xml进行适当的修改,改动内容如下:
2.1 将所有的“stopwords.txt”替换成“lang/stopwords_en.txt”。
2.2 在 <fields> 内添加如下一行:
<field name="_version_" type="long" indexed="true" stored="true"/>
2.3 将fields中的segment、digest、boost、tstamp的indexed属性改为true。
3.将${SOLR_HOME}/example/solr/collection1/conf下的solrconfig.xml进行改动,将里面的所有的
<str name="df">text</str>
替换成
<str name="df">content</str>
2.solr启动
- java -jar example/start.jar
- java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar(启动带端口)
3.solr停止
- java -DSTOP.PORT=8079 -DSTOP.KEY=mysecret -jar start.jar --stop
- 直接杀进程 kill pid
3.相关命令
查看端口占用情况: netstat -ntlp|grep 8983
杀死进程:kill pid
浙公网安备 33010602011771号