Loading

摘要: Lucene中索引阶段Boost的值会被存放在.nrm文件中,用16进制打开就能看的到。每个Boost值最终会被保存于一个Byte中,如果细心的同学就会发现在SetBoost的时候参数类型是float,float是四个字节的,也就是说最后会有精度丢失。废了方便查询给出代码和0-255对应的float下面是换算的代码: public static sbyte FloatToByte315(float f) { int num = BitConverter.ToInt32(BitConverter.GetBytes(f), 0); ... 阅读全文
posted @ 2012-05-22 15:31 today4king 阅读(1450) 评论(0) 推荐(0) 编辑