solr3.0 group 分组查询
用过solr1.0的基础上,很简单了。
官网下载solr3.5 以上版本
增加以下配置:
设置 slorconfig.xml
在/pub/www/solr/conf/slorconfig.xml中设置数据目录
<dataDir>${solr.data.dir:/pub/www/solr/data}</dataDir>
修改 /pub/www/solr/data 权限
chown tomcat6:tomcat6 /pub/www/solr/data
修改solrconfig中相关类库的调用路径,指定contrib,dist及中文分词组件mmseg4j
<!-- A dir option by itself adds any files found in the directory to
the classpath, this is useful for including all jars in a
directory.
-->
<lib dir="/pub/www/solr/contrib/extraction/lib" />
<lib dir="/pub/www/solr/contrib/clustering/lib/" />
<lib dir="/pub/www/solr/contrib/velocity/lib" />
<lib dir="/pub/www/solr/contrib/mmseg4j/dist" />
<!-- When a regex is specified in addition to a directory, only the
files in that directory which completely match the regex
(anchored on both ends) will be included.
-->
<lib dir="/pub/www/solr/dist/" regex="apache-solr-cell-\d.*\.jar" />
<lib dir="/pub/www/solr/dist/" regex="apache-solr-clustering-\d.*\.jar" />
<lib dir="/pub/www/solr/dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
<lib dir="/pub/www/solr/dist/" regex="apache-solr-langid-\d.*\.jar" />
<lib dir="/pub/www/solr/dist/" regex="apache-solr-velocity-\d.*\.jar" />
----------------
结合
http://wiki.apache.org/solr/FieldCollapsing
file_get_contents()
完毕
猜你喜欢
转载自zlr.iteye.com/blog/1588031
今日推荐
周排行