ouzhoudijie 发表于 2016-12-16 06:44:28

关于solr搜索的一些资料

  1,搜索中的乱码问题
  配置中的配置文件 config->server.xml 中
  <Connector port="8080" maxHttpHeaderSize="8192" URIEncoding="UTF-8"/>
  solr搜索接受的参数和传递参数的servlet编码也要是utf-8的,
  2,配置中文分词的方法
  3,用post的方法更新索引
  java -jar post.jar solrone.xml
  http://localhost:8983/solr/dataimport?command=full-import
  4,连接数据库更新失败Indexing failed. Rolled back all changes
  5,查询 排序问题 通过url来处理
  q=后面跟要搜索的内容 & fl=要返回的字段默认是全部返回,
  sort= 排序 desc
  wt= xml json php 指定输出格式 默认为xml
  fq= sname:***过滤查询
  以下是网上的一些资料
  IBM的资料很详细老外写的
  http://www.ibm.com/developerworks/cn/opensource/os-php-apachesolr/index.html
  一个很全的例子
  http://lianj-lee.iyunv.com/blog/464364
  一个不错的中文分词文档 mmseg4j
  http://chenlb.iyunv.com/blog/353334
  关注solr的博客
  http://blog.chenlb.com/2009/03/solr-query-params-explain.html
  英文不错的可以看看wiki文档
  http://wiki.apache.org/solr/CommonQueryParameters#head-6522ef80f22d0e50d2f12ec487758577506d6002
页: [1]
查看完整版本: 关于solr搜索的一些资料