开发者

Field.Store.COMPRESS in Lucene 3.0.2

I am upgrading lucene 2.4.1 to 3.0.2 in my java web project in lucene API's i 开发者_开发技巧found that Field.Store.COMPRESS is not present in 3.0.2 so what i can use in place of Field.Store.COMPRESS? some time field data is so large that i have to compress that.


Lucene made the decision to not compress fields, as it was really slow, and not Lucene's forte. The Javadocs say:

Please use CompressionTools instead. For string fields that were previously indexed and stored using compression, the new way to achieve this is: First add the field indexed-only (no store) and additionally using the same field name as a binary, stored field with CompressionTools.compressString(java.lang.String).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜