solr4.6关于schema.xml版本号的问题
2014-01-16 10:36
453 查看
前天在服务器上搭建一主一从的solr4.6的服务器,建core的时候,抛弃了以前从solr4.6下载包里面的配置文件。而是上这个文件夹拿配置文件:F:\solr\solr-4.6.0\example\multicore\core0\conf。这个文件夹给的配置文件是最简单的!只需一个schema.xml和solrconfig.xml就可以迅速搭建一个core出来。
搭建好之后,基本的CRUD操作都可以。但是搜索却只能全字匹配或者只能单个字符匹配出结果。这是绝对不能容忍的。定位问题接近了一天,找有经验的同事给排查也没排查出来问题。最后我自己一点一点比对multicore文件夹下的配置文件跟F:\solr\solr-4.6.0\example\solr\collection1这个文件夹下的配置文件的配置区别。
当我把schema.xml的version属性从1.1升到跟collection1下的相同文件的1.5一致之后。重启服务器,问题解决了!
我只想想说,提供solr4.6包的工程师坑爹。schema.xml的version属性对搜索的效果影响重大,4.6下的multicore提供的版本号却是古老的1.1.
查了下schema.xml的官方文档:http://wiki.apache.org/solr/SchemaXml
翻译一下:
1.0:多值属性不存在,所有的域本质上是多值属性
1.1:多值属性被引进,默认为false
1.2:omitTermFreqAndPositions属性被引进,默认为true,文本域除外
1.3:删除可选的域压缩特性
1.4:当单个字符串产生多个词的时候,autoGeneratePhraseQueries 属性被引进以驱动查询分析器行为。版本大于等于1.4默认被关闭
1.5:对于原子类型,omitNorms属性默认为true
从官方文档上可以看出,版本号不一样,shema.xml被解析出来的效果也是不一样的。
搭建好之后,基本的CRUD操作都可以。但是搜索却只能全字匹配或者只能单个字符匹配出结果。这是绝对不能容忍的。定位问题接近了一天,找有经验的同事给排查也没排查出来问题。最后我自己一点一点比对multicore文件夹下的配置文件跟F:\solr\solr-4.6.0\example\solr\collection1这个文件夹下的配置文件的配置区别。
当我把schema.xml的version属性从1.1升到跟collection1下的相同文件的1.5一致之后。重启服务器,问题解决了!
我只想想说,提供solr4.6包的工程师坑爹。schema.xml的version属性对搜索的效果影响重大,4.6下的multicore提供的版本号却是古老的1.1.
查了下schema.xml的官方文档:http://wiki.apache.org/solr/SchemaXml
<schema name="example" version="1.5"> 49 <!-- attribute "name" is the name of this schema and is only used for display purposes. 50 version="x.y" is Solr's version number for the schema syntax and 51 semantics. It should not normally be changed by applications. 52 53 1.0: multiValued attribute did not exist, all fields are multiValued 54 by nature 55 1.1: multiValued attribute introduced, false by default 56 1.2: omitTermFreqAndPositions attribute introduced, true by default 57 except for text fields. 58 1.3: removed optional field compress feature 59 1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser 60 behavior when a single string produces multiple tokens. Defaults 61 to off for version >= 1.4 62 1.5: omitNorms defaults to true for primitive field types 63 (int, float, boolean, string...) 64 -->
翻译一下:
1.0:多值属性不存在,所有的域本质上是多值属性
1.1:多值属性被引进,默认为false
1.2:omitTermFreqAndPositions属性被引进,默认为true,文本域除外
1.3:删除可选的域压缩特性
1.4:当单个字符串产生多个词的时候,autoGeneratePhraseQueries 属性被引进以驱动查询分析器行为。版本大于等于1.4默认被关闭
1.5:对于原子类型,omitNorms属性默认为true
从官方文档上可以看出,版本号不一样,shema.xml被解析出来的效果也是不一样的。
相关文章推荐
- 关于solr schema.xml 和solrconfig.xml的解释
- 更新solr的schema.xml带的问题
- 【solr】关于solr schema.xml 和solrconfig.xml的解释
- 关于solr schema.xml 和solrconfig.xml的解释
- 关于solr schema.xml 和solrconfig.xml的解释 (转)
- 关于solr schema.xml 和solrconfig.xml的解释
- 关于solr schema.xml 和solrconfig.xml的解释
- 关于solr schema.xml 和solrconfig.xml的解释
- 关于solr schema.xml 和solrconfig.xml的解释
- Solr schema.xml中无法使用非string类型(long,int)的id问题
- 关于利用Schema解析XML,生成、编辑XML的节点问题
- 关于solr schema.xml 和solrconfig.xml的解释
- struts2+spring4.0+hibernate4三大框架的结合,关于struts.xml的存放位置问题
- 关于xml编码问题在VB,PHP,JAVA下的解决方案
- 关于XMLList = node["节点1"]["节点2"]中只有1个节点的问题
- Solr配置,schema.xml的配置,以及中文分词
- solrcore的schema.xml
- 关于javaweb中导入json或者xml文件出现小红叉问题
- 关于solr的一些总结和问题
- Solr 配置文件之schema.xml