分享

solr field compressed 选项被removed了,是否有替代的或者其他的压缩方案,求教

IT_雪夜归人 发表于 2016-4-27 09:45:09 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 7831
solr field compressed 选项被removed了,是否有替代的或者其他的压缩方案,求教

已有(3)人评论

跳转到指定楼层
leo_1989 发表于 2016-4-27 10:55:26
楼主从哪看到的,好像一直是这个
回复

使用道具 举报

IT_雪夜归人 发表于 2016-4-27 11:05:36
leo_1989 发表于 2016-4-27 10:55
楼主从哪看到的,好像一直是这个

<schema name="example" version="1.5">
  <!-- attribute "name" is the name of this schema and is only used for display purposes.
       version="x.y" is Solr's version number for the schema syntax and
       semantics.  It should not normally be changed by applications.

       1.0: multiValued attribute did not exist, all fields are multiValued
            by nature
       1.1: multiValued attribute introduced, false by default
       1.2: omitTermFreqAndPositions attribute introduced, true by default
            except for text fields.
       1.3: removed optional field compress feature
       1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
            behavior when a single string produces multiple tokens.  Defaults
            to off for version >= 1.4
       1.5: omitNorms defaults to true for primitive field types
            (int, float, boolean, string...)
版本高了之后,compress feature被removed掉了

回复

使用道具 举报

Alkaloid0515 发表于 2016-4-27 11:31:05
可能是因为降低查询效率,所以决定移除了
压缩这个操作将会增加cpu的负担,其实,solr一个典型的依赖于cpu处理速度的服务,增加这个压缩的操作,将无疑会降低查询性能。但是,压缩后的数据将会是压缩前的数据的6分之一的大小。然而solr的查询性能也会有15%左右的消耗。
空间小的话,楼主可以增加磁盘或则

其它诸如
1.中间变量压缩、单例化

所有查询或者建索引过程中,尽量少创建对象,而通过set改变对象值,以及单例化,提升性能。一些较大中间变量,如果可以的话,采取一些整数压缩

2.对象表示重定义
例如日期、地区、url、byte等一些对象,可以考虑差值、区位码、可别部分、等结构,使得内存开销降低间接使得内存使用率提高,获得更好性能。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条